Dynamically create control and set id for control in asp.net

Posted by Mohansubramanian under jQuery on 1/9/2015 | Points: 10 | Views : 449 | Status : [Member] | Replies : 1
Hi,

how to create dynamic control and set id for that control using jquery.

Regards,
Mohan Subramanian
http://mohanks.com



Responses

Posted by: kgovindarao523-21772 on: 1/12/2015 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi,

Here is the code
$(document).ready(function(){
var elem=$('body').append('<div>');
elem.text('Hello World !!');
elem.attr('id','YOURID');
});


Thank you,
Govind

Mohansubramanian, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response