当前位置: 代码迷 >> ASP.NET >> 怎样利用dom给input添加只读属性,该怎么处理
  详细解决方案

怎样利用dom给input添加只读属性,该怎么处理

热度:1643   发布时间:2013-02-26 00:00:00.0
怎样利用dom给input添加只读属性
如题

------解决方案--------------------------------------------------------
dom 是指什么? xmlDocument?
------解决方案--------------------------------------------------------
<script type= "text/javascript ">
var input = document.createElement( "input ");
input.type= "text ";
input.readOnly = "true ";
document.body.appendChild(input);
</script>
  相关解决方案