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

Why we use java script when java also supports validation?

1 Answers  


Can you put javascript in html?

0 Answers  


Why is it called javascript?

0 Answers  


What is the meaning of callback function?

0 Answers  


What is a nan value?

0 Answers  


How do I enable cookies and javascript?

0 Answers  


Can I open javascript on iphone?

0 Answers  


What are JavaScript types?

11 Answers   Infosys, Satyam,


What are 2 (shorthand) boolean operators supported by javascript

0 Answers  


What typeof returns for a null value?

0 Answers  


Which built-in method returns the calling string value converted to upper case?

0 Answers  


How to trigger a postback on an updatepanel from javascript?

0 Answers  


Categories