How to enable button using JQuery?

In this article, you will learn how to enable button using JQuery. In the previous article i have shown how to disable button using JQuery. These are good JQuery Interview Questions. In this example we are using removeAttr() method for disable button. If you run below code one button will come. If you click on that button, button will disable and message will show. After that click on message, that button will enable.

        <script type="text/javascript" src=""></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $("#btnDisable").click(function () {
                    $(this).attr("disabled", "disabled");
                    $("#output").html("<b>Click me button will enable now <br /> </b>");
                $("#output").click(function () {
                    $("#output").html(" ");
<input type="button" value="I will disable by click" id="btnDisable" />
<div id="output">

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