CRM 2011 JS: Hide a attribute on form using javascript in CRM 2011

This is how to Hide a attribute on form using javascript in CRM 2011

 

//Hide a attribute

Xrm.Page.ui.controls.get("attributename").setVisible(false);