jQuery attr not working
<p>I am working with asp.net, C#, jQuery 1.8.3/1.7.2</p>

<p>I want to change a textbox "Readonly" attribute to 'true' or 'false' in script when the page loads.
<strong>*updated</strong>*The value to the textbox loads at runtime..
Here is the script:</p>

<pre><code>function hidebtn() {        
    $('#diviv').css({
        "display": "block"
    });

    $("#txtname").attr('ReadOnly', true);
}
</code></pre>

<p>If I write a alert, it working fine, now div appears well. The txtname attribute is not changing. I am calling this method from codebehind like this:</p>

<pre><code>Page.ClientScript.RegisterStartupScript(this.GetType(), "Call my function", "hidebtn();", true);
</code></pre>
