w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: DOM Link ¶ÔÏó
The Link object represents an HTML link element. The link element can only be used within the <head> tag.
Link¶ÔÏó´ú±íHTMLÖеÄlinkÔªËØ¡£linkÔªËØÖ»ÄÜÔÚ<head>±êÇ©ÖÐʹÓÃ
IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).
| Property ÊôÐÔ |
Description ÃèÊö |
IE | F | N | W3C |
|---|---|---|---|---|---|
| charset | Sets or returns the character set of the linked resource ÉèÖûò·µ»Ø±»Á¬×ÊÔ´µÄ×Ö·û¼¯¡£ |
4 | Yes | ||
| disabled | Sets or returns whether or not the link object should be disabled ÉèÖûò·µ»Ølink¶ÔÏóÊÇ·ñΪ½ûÓà |
4 | Yes | ||
| href | Sets or returns the URL of the linked resource ÉèÖûò·µ»Ø±»Á¬×ÊÔ´µÄURL |
4 | 1 | 2 | Yes |
| hreflang | Sets or returns the language code of the linked resource ÉèÖûò·µ»Ø±»Á¬×ÊÔ´µÄÓïÑÔ´úÂë |
4 | Yes | ||
| id | Sets or returns the id of the link (In IE 4 this property is read-only) ÉèÖûò·µ»ØlinkµÄid(ÔÚIE4ÖÐÕâ¸öÊôÐÔΪֻ¶Á) |
4 | 1 | No | |
| media | - | Yes | |||
| name | Sets or returns the name of the link object ÉèÖûò·µ»Ølink¶ÔÏóµÄname |
4 | No | ||
| rel | Sets or returns the relationship between the current document and the target URL ÉèÖûò·µ»Øµ±Ç°ÎĵµÓëÄ¿±êURLÖ®¼äµÄ¹ØÁª |
4 | Yes | ||
| rev | Sets or returns the relationship between the current document and the target URL ÉèÖûò·µ»Øµ±Ç°ÎĵµÓëÄ¿±êURLÖ®¼äµÄ¹ØÁª |
4 | Yes | ||
| target | Sets or returns the window/frame where to open the target URL ÉèÖûò·µ»Ø´ò¿ªÄ¿±êURLµÄ·½Ê½ |
4 | 1 | 2 | Yes |
| type | Sets or returns the MIME type of the linked resource ÉèÖûò·µ»Ø±»Á¬×ÊÔ´µÄMIMEÀàÐÍ |
4 | Yes |
Syntax: object.event_name="someJavaScriptCode"
Óï·¨£º¶ÔÏó.ʼþÃû³Æ=“һЩJS´úÂë”
| Event ʼþ |
Description ÃèÊö |
IE | F | N | W3C |
|---|---|---|---|---|---|
| onLoad | Executes some code after the browser loads the link object ÔÚä¯ÀÀÆ÷¼ÓÔØlink¶ÔÏóºóÖ´ÐÐһЩ´úÂë |
4 | 1 | 2 |
ÆÀÂÛ (0)
All