HTML DOM type 属性
定义和用法
type属性设置或返回目标URL的MIME类型(如“text/css”、“text/javascript”、“images/gif”等)。
语法
linkObject.type=MIME_type
实例
以下示例返回目标URL的MIME类型:
<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>