Get and set name of the button using JQuery

Some time we need to change the button name using jQuery. It is very easy to do in Jquery. Please check see following example. Just copy and paste you will get output like below image.


Set and get button name using JQuery
Set and get button name using JQuery 

            <script type="text/javascript" src=""></script>
            <script type="text/javascript">
                $(document).ready(function () {
//author- Ranga Rajesh Kumar (
                //seeting value of the button name
                    $('#btnName').val("Submit button");
                    //getting value of the button name. 
<input type="button" id="btnName"  />

Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar