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 |
do any browser need activeX object to run javascripts?
How to use "join()" to create a string from an array using javascript?
why we use javascript in html ?
What is context in javascript?
Is it safe to use javascript?
What is javascript namespacing?
What is an enum
Which is best for front end?
What are the different objects used in javascripts?
What are anonymous functions in Javascript?
Write a program that inputs a 5-digit integer from the keyboard and prints if the input number is a palindrome or not. A palindrome is a number which has the same digit from either end.
Is an interface is a class?