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 create a confirmation box?
why can't we call a static method from a non-static method
How javascript sort function works?
How to add html elements dynamically with JavaScript?
hi iM rahul.my questions is my project is a web based & developed using java,jsp. when i record it using qtp what script i will get like either browser("jdfjkf").page("nkf").... or javawindow("f d ").javaedit("Dasf").... plz clarify my doubt asap and i also need some vbscipt of java coding?
How do you implement Ajax using hide() function in JQuery?
How to create a function using function constructor?
How to test a string as a literal and as an object ?
Explain arrow functions?
How can you declare a class in javascript?
What is unescape() function?
What is the difference between .call() and .apply()?