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
Write a way by which you can do something on the close of the window ?
Is javascript array dynamic?
What is javascript and its advantages?
What is innertext javascript?
What is the difference between test () and exec () methods?
Which built-in method returns the calling string value converted to lower case?
What are the features of javascript?
What are the problems associated with using javascript, and are there javascript techniques that you discourage?
Describe the properties of an anonymous function in JavaScript?
What is the disadvantage of javascript?
Which company developed JavaScript?
What is jscript used for?
What does break and continue statements do in javascript?
Why is currying called currying?
What is event target in javascript?