w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: HTML DOM idÊôÐÔ
The id property sets or returns the id of the <base> element.
idÊôÐÔ¿ÉÉèÖûò·µ»Ø<base>ÔªËØµÄidÖµ
baseObject.id=id |
The following example returns the base id:
·µ»ØbaseµÄidÖµ£º
<html> <head> <base id="myBaseId" href="http://www.w3pop.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