当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM id属性

HTML DOM
DOM TableRow 对象
DOM Textarea 对象
DOM Window 对象

HTML DOM id属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 488 ::
收藏到网摘: n/a

Definition and Usage
定义与用法

The id property sets or returns the id of the <base> element.
id属性可设置或返回<base>元素的id值

Syntax
语法

baseObject.id=id


Example
举例

The following example returns the base id:
返回base的id值:

<html>
<head>
<base id="myBaseId" href="http://www.ruanchen.com/tech/school/htmldom/" />
</head>
<body>
<p>Base id:
<script type="text/javascript">
x=document.getElementsByTagName('base')[0];
document.write(x.id);
</script>
</body>
</html>

Output:
输出

Base id: myBaseId 


演练

Get the base id of an HTML document
得到HTML文档的基础id

评论 (0) All

登陆 | 还没注册?