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 detect browser name using JavaScript?
how to hide alphabets in java as password '*'
Is javascript array dynamic?
What are associative arrays in javascript?
Can you explain the difference between == and ===?
In Javascript are calculations with fractional numbers guaranteed to be precise?
How do you know if a set of points is a function?
Is javascript the future?
What is the default scope in javascript?
Is array an object javascript?
Which keywords are used to handle exceptions?
What percentage of websites use javascript?