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 |
How to getting values from cookies to set widgets?
Name the different types of pop up boxes in Javascript?
How to import all exports of a file as an object.
What are all the types of Pop up boxes available in JavaScript?
Can I open javascript on iphone?
How can I learn javascript fast?
Where can I learn javascript for free?
What are local variables in javascript?
How to submit a form using JavaScript by clicking a link?
What is shift() method in javascript?
How do you round a value in javascript?
What is an empty html tag?