1.readonly
$('input').attr("readonly","readonly")//将input元素设置为readonly $('input').removeAttr("readonly");//去除input元素的readonly属性 if($('input').attr("readonly")==true)//判断input元素是否已经设置了readonly属性http://www.unitymanual.com/forum76.html
$('input').attr("readonly",true)//将input元素设置为readonly $('input').attr("readonly",false)//去除input元素的readonly属性 $('input').attr("readonly","readonly")//将input元素设置为readonly $('input').attr("readonly","")//去除input元素的readonly属性 2.disabled $('input').attr("disabled","disabled")//将input元素设置为disabled $('input').removeAttr("disabled");//去除input元素的disabled属性 if($('input').attr("disabled")==true)//判断input元素是否已经设置了disabled属性http://www.unitymanual.com/sitemap.xml
$('input').attr("disabled",true)//将input元素设置为disabled $('input').attr("disabled",false)//去除input元素的disabled属性 $('input').attr("disabled","disabled")//将input元素设置为disabled $('input').attr("disabled","")//去除input元素的disabled属性