简单教程
提交运行
代码编辑器:
<link id="link1" rel="stylesheet" type="text/css" href="/static/i/javascript/basic/style1.css"> <script> function displayResult(){ var x=document.getElementById("link1").type; alert(x); } </script> <button type="button" onclick="displayResult()">显示链接元素的 MIME 类型</button>
运行结果: