HTML DOM type 屬性
定義和用法
type 屬性可設(shè)置或返回被鏈資源的 MIME 類型。
語法
anchorObject.type=type
實例
下面的例子可返回被鏈資源的 MIME 類型:
<html>
<body>
<p><a id="myAnchor" type="text/html"
href="http://www.dbjr.com.cn">jb51.net</a></p>
<script type="text/javascript">
x=document.getElementById("myAnchor");
document.write(x.type
);
</script>
</body>
</html>