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

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

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

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

HTML DOM target ÊôÐÔ


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

¶¨ÒåÓëÓ÷¨

The target property sets or returns where to open the target URL.
target ÊôÐÔ¿ÉÓÃÀ´ÉèÖûò·µ»ØÄ¿±êURLµÄ´ò¿ª·½Ê½

Óï·¨

anchorObject.target=target


¾ÙÀý

<html>
<head>
<script type="text/javascript">
function changeLink()
{
document.getElementById('myLink').innerHTML="W3pop"
document.getElementById('myLink').href="http://www.w3pop.com"

document.getElementById('myLink').target="_blank"
}
</script>
</head>
<body>
<a id="myLink" href="http://www.microsoft.com">Microsoft</a>

<br /><br />
<input type="button" onclick="changeLink()" value="Change link">
</body>
</html>


³¢ÊÔÓëÑÝʾ

Change text, URL, and target attribute of a link
¸Ä±äÁ¬½ÓµÄÎÄ×Ö£¬URLÒÔ¼°Ä¿±êÊôÐÔ

ÆÀÂÛ (0) All