html属性节点的specified说明

来源:互联网 发布:中兴n760软件下载 编辑:程序博客网 时间:2024/06/03 18:48
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>        <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />        <title>            New Document        </title>    </head>        <body>        <div id='test' onclick='return false;'>            <script language="javascript">                < !--                var args = test(document.getElementById('test'));                function test(dom) {                    var attributes = dom.attributes;                    var args = {};                    for (var index = 0; index < attributes.length; index++) {                        var node = attributes[index];                        var nodeName = node.nodeName;                        //节点属性的specified说明                        if (node.specified) {                            document.write(nodeName + '  :  ' + node.specified + '<br />');                        }                    }                }                //-->                            </script>    </body></html>


原创粉丝点击