Can we create buttons in JavaScript ? if yes how? pls provide
sample code... Thanks in advance.....
Answer Posted / stardev24
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 |
Post New Answer View All Answers
What is a framework programming?
What is the difference between push() and concat() in javascript?
What are trailing whitespace?
Describe javascript and vbscript.
What is shift() method in javascript?
Does javascript support foreach loop?
Define closure.
What is the data type of variables in javascript?
How to use strings as array indexes using javascript?
How do I install javascript?
What is the most widely used programming language?
List out all the falsifying tokens in Javascript?
Is javascript default scripting language?
How can a Javascript code redirect the user to a different page?
What are javascript closures?when would you use them?