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.....

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what will happen and why if i will acess the methods of superclass which is declared as private by a object of same subclass.

1996


How to write normal text code using JavaScript dynamically?

920


Is html and javascript the same?

834


What is the use of a number object in javascript?

940


Is Javascript a Functional Programming Language?

1076


What is 'use strict'?

913


Write JavaScript code to use file system in binary format?

2493


what is flux in javascript?

1002


I am providing the Online& class room training on Worksoft Certify for SAP/HTML/JAVA using real time scenarios in a real time environment for a real time project, If any one is interested please get in touch with me on aimansaud@gmail.com

1461


Difference Between JavaScript and ECMAScript?

850


how do you declare variables in javascript?

960


Explain the typeof operator?

921


How we can get the value of an element using javascript?

935


What is strict mode?

1126


What does 3 dots mean in javascript?

847