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 |
How to setting a cookie with the contents of a textbox?
What is the difference between undefined value and null value?
Is javascript pure object oriented?
Write the code to maximize an image using javaScript?
Is javascript whitespace sensitive?
List the comparison operators supported by javascript?
How can a particular frame be targeted, from a hyperlink, in javascript?
Define unescape() and escape() functions?
What would be the result of 2+5+”3″?
List some of the disadvantages of javascript.
print the following using loop. 54321 4321 321 21 1
2 Answers Delhi Public School,
How do I unblock javascript in chrome?