CRM 2011 JS: Get and Set control disabled in CRM 2011

This is how to Get and Set control disabled  in CRM 2011

 

Get disable control

var isdisable = Xrm.Page.ui.controls.get("attributename").getDisabled();

True value shows disable field

 

Set control disable

Xrm.Page.ui.controls.get("attributename").setDisabled(true);