Can we create buttons in JavaScript ? if yes how? pls provide
sample code... Thanks in advance.....
We can create in multiple ways.Here I am doing by using jquery
HTML:
<div id="target">
<button id="CreateButton">Create button</button>
</div>
JAVASCRIPT:
$(document).ready(function () {
$("#CreateButton").click(
function () { $('#target').append('<button>button created</button>')
}
);
});
| Is This Answer Correct ? | 3 Yes | 0 No |
What is new keyword in javascript?
Is javascript necessary?
what is the purpose of using jsp?
In how many ways a Javascript code can be involved in an HTML file?
Which built-in method reverses the order of the elements of an array?
What are the different ways in which we can use the link tag ? Illustrate with an example. Is it possible to link a file with another file on a different file server ? If yes, how ?
Is a javascript script faster than an asp script?
How to test 404 page in QA
What are Cookies in Javascript?
do any browser need activeX object to run javascripts?
Is it possible make a call to server side event of any button using javascript?
How do you disable javascript?