HTML DOM type 属性
定义和用法
The type property sets or returns the MIME type of the target URL (like "text/css", "text/javascript", "image/gif", etc.).
语法
- linkObject.type=MIME_type
实例
The following example returns the MIME type of the target URL:
- <html>
- <head>
- <link rel="stylesheet" type="text/css"
- id="style1" href="try_dom_link.css" />
- </head>
- <body>
- <script type="text/javascript">
- x=document.getElementById("style1");
- document.write("MIME type: " + x.type);
- </script>
- </body>
- </html>