HTML DOM specified 属性
属性对象
实例
检查属性是否有指定的值:
document.getElementById("demo").attributes[0].specified;
输出结果:
true
定义和用法
如果在文档中设置了属性值,则 specified 属性返回 true,如果是 DTD/Schema 中的默认值,则返回 false。
浏览器支持





所有主要浏览器都支持 specified 属性
语法
技术细节
返回值: |
Boolean, true|false
|
DOM 版本 |
Core Level 1 |
属性对象