日期:2014-05-20  浏览次数:20434 次

怎样利用dom给input添加只读属性
如题

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