编辑下面的代码:【加编码】
<html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <script> function displayResult() { var x=document.getElementsByTagName("meta")[0].httpEquiv; alert(x); } </script> </head> <body> <button type="button" onclick="displayResult()">Display HTTP-Equiv</button> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂