ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: HTML DOM idÊôÐÔ

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

HTML DOM idÊôÐÔ


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:1453 :: ::

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.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