Click here to Skip to main content
16,017,238 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi sir plz help me any one
how to create button and css apply height and width using jquery?
and button name display delete mark symbol.
Posted
Comments
Have you tried anything yet?

1 solution

Suppose your mark up for a blank container div goes like below

HTML
<div id="DynamicDiv"></div>


Then to inject a dynamic button by JQuery you have script as follows

JavaScript
$(document).ready(function () {
    $("#DynamicDiv").html("<input type='button' id='DeleteButton' value='Delete' style='height:30px;width:100px;'>");
    $("#DeleteButton").click(function () {
        alert("Helloo from jquery");
    });
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900