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 are the three core languages in web pages?
What is the method for reading and writing a file in javascript?
How to force a page to go to another page using javascript ?
What is the most widely used programming language?
What is break and continue statements?
How does typeof operator work?
How to manage exception handling in javascript?
What are escape characters?
Why typeof null is object?
Write the code for adding new elements dynamically?
What is decodeuri() function?
What does the operator do in javascript?
What does the following statement declares?
how to write frame work Architecture in QTP
How do I open a website code?