首页 > 其他 > 详细

setAttribute

时间:2015-08-06 23:54:47      阅读:216      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<input id="txt" type="text" />
<input id="btn" type="button"/>
<script>
    var oTxt = document.getElementById(txt );
    var oBtn = document.getElementById(btn);
    oBtn.onclick = function ()
    {
//       oTxt.value = ‘defdi‘;
//        oTxt[‘value‘] = ‘deidi‘;
        oTxt.setAttribute(value,dieid);
    };
</script>
</body>
</html>

技术分享

setAttribute

原文:http://www.cnblogs.com/zhuni/p/4709380.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!