如何在JavaScript中搜索链接的type属性的值?
原创要在 JavaScript 中搜索链接的 type 属性值,请使用 type 属性。您可以尝试运行以下代码来获取type属性的值。
示例
<!DOCTYPE html> <html> <body> <p><a id = "qriesid" href = "https://qries.com/" type="text/html" >Qries</a></p> <script> var x = document.getElementById("qriesid").type; document.write("Value of the type attribute: "+x); </script> </body> </html>
以上就是如何在JavaScript中搜索链接的type属性的值?的详细内容,更多请关注IT视界其它相关文章!
上一篇:将HTML中用于表单提交的字符编码设置为: 下一篇:html怎么转txt