Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can we create buttons in JavaScript ? if yes how? pls provide
sample code... Thanks in advance.....



Can we create buttons in JavaScript ? if yes how? pls provide sample code... Thanks in advance......

Answer / 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

More JavaScript Interview Questions

do any browser need activeX object to run javascripts?

2 Answers  


How to use "join()" to create a string from an array using javascript?

0 Answers  


why we use javascript in html ?

4 Answers  


What is context in javascript?

0 Answers  


Is it safe to use javascript?

0 Answers  


What is javascript namespacing?

0 Answers  


What is an enum

1 Answers  


Which is best for front end?

0 Answers  


What are the different objects used in javascripts?

0 Answers  


What are anonymous functions in Javascript?

0 Answers  


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.

1 Answers  


Is an interface is a class?

1 Answers  


Categories