How to enabled button using javascript in asp.net
<p>I'm trying to enabled the disabled button using on clicking of the html button in asp.net.
but its not getting enbled.
here is my code</p>

<pre><code>    &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;script type="text/javascript"&gt;
        function setDefaults() {
            var btn = document.getElementById("btn");
            btn.disabled = false;
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
    &lt;button  onclick="javascript:setDefaults();" causesvalidation="false"&gt;Defaults&lt;/button&gt;
    &lt;asp:Button ID="btn" runat="server" Text="btn" Enabled="false" /&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>please let me know whats wrong with my attempt.</p>
