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 javascript in simple terms?
How do I run javascript on my iphone?
What are the characteristics of javascript ‘strict mode’?
coding of java scripts
Explain “use strict” ?
What is the difference between undefined value and null value?
What is the most popular javascript library?
What is object in javascript?
What is difference between undefined variable and undeclared variable?
What would be the result of 2+5+”3″?
What is a module in javascript?
Which software is used for javascript?