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 |
Why we use java script when java also supports validation?
Can you put javascript in html?
Why is it called javascript?
What is the meaning of callback function?
What is a nan value?
How do I enable cookies and javascript?
Can I open javascript on iphone?
What are JavaScript types?
What are 2 (shorthand) boolean operators supported by javascript
What typeof returns for a null value?
Which built-in method returns the calling string value converted to upper case?
How to trigger a postback on an updatepanel from javascript?