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 |
Methods get and post in html forms - what's the difference?
What are the two basic groups of dataypes in javascript?
What is the use of a form in html page? Is there any way to submit the page without using the form.
List few difference between primitive and non primitive javascript data types?
What is the === in javascript?
What are the security related issues in JavaScript scripts?
What is webassembly good for?
Where do I write javascript code?
How to write hello world on the web page?
How many types of functions JavaScript supports?
How about 2+5+"8"?
What is rest parameters in javascript?