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 |
Explain promise in javascript?
How do you target a specific frame from a hyperlink in javascript?
Is javascript becoming obsolete?
What is undefined in math?
How long does it take to learn coding?
What is a hash javascript?
Are javascript variables global?
Is python better than javascript?
Describe javascript and vbscript.
What is the source code for include() & forwrd() method servlet program?
What are nodes in javascript?
Are java and javascript same?