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 get the primitive value of a string in Javascript?
What is spread operator?
How to remove duplicate values from a javascript array?
Name the different types of pop up boxes in Javascript?
How to write normal text code using JavaScript dynamically?
How to make a array as a stack using javascript?
What is a reverse string?
Name some of the Javascript frameworks?
what is a dataset
what is lazy fetching in hibernate
What would be the result of 3+2+”7″?
How do you write a comment in javascript?