首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

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

2012-02-11 
怎样利用dom给input添加只读属性如题[解决办法]dom 是指什么? xmlDocument?[解决办法] script type tex

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

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

热点排行