Legend form 属性
Label 对象
实例
返回包含 <legend> 元素的表单的 id:
var x = document.getElementById("myLegend").form.id;
x 输出结果为:
myForm
定义和用法
form 属性返回一个包含 legend 的表单的引用。
如果成功,该属性返回一个表单对象。
注意:该属性是只读的。
浏览器支持
![Internet Explorer Internet Explorer](../images/compatible_ie.gif)
![Firefox Firefox](../images/compatible_firefox.gif)
![Opera Opera](../images/compatible_opera.gif)
![Google Chrome Google Chrome](../images/compatible_chrome.gif)
![Safari Safari](../images/compatible_safari.gif)
所有主流浏览器都支持 form 属性。
语法
技术细节
返回值: |
一个包含 legend 的表单的引用。如果 legend 不在表单内,则返回 null。 |
Label 对象