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

What is javascript in simple terms?

0 Answers  


How do I run javascript on my iphone?

0 Answers  


What are the characteristics of javascript ‘strict mode’?

0 Answers  


coding of java scripts

0 Answers   Oracle,


Explain “use strict” ?

0 Answers  


What is the difference between undefined value and null value?

0 Answers  


What is the most popular javascript library?

0 Answers  


What is object in javascript?

0 Answers  


What is difference between undefined variable and undeclared variable?

0 Answers  


What would be the result of 2+5+”3″?

0 Answers  


What is a module in javascript?

0 Answers  


Which software is used for javascript?

0 Answers  


Categories