运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <link id="myLink" href="domoarigato.htm" hreflang="ja"> </head> <body> <p>Click the button to return the language code of the linked document.</p> <p>The hreflang attribute does not render as anything special in any of the major browsers. However, it can be used by search engines, or in scripts.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myLink").hreflang; document.getElementById("demo").innerHTML = x; } </script> </body> </html>