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 test for bad numbers using javascript?
How to make elements invisible?
how to get no of items from from weblist?
What are the data types supported by javascript?
How to write html code dynamically using JavaScript?
What is variables in javascript?
How long does it take to learn coding?
Is Javascript a Functional Programming Language?
Is javascript safe to download?
What is an empty html tag?
How to print a web page using javascript?
What is a framework programming?