zoukankan      html  css  js  c++  java
  • JS中的document.title可以获取当前网页的标题

    <!DOCTYPE html>
    <html>
    <head>
    <title>jb51.net</title>
    </head>
    <body>
    current document's title is:
    <script>
    document.write(document.title);
    </script>
    </body>
    </html>

    在ie6和ff2.0下测试通过。

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>标题一</title>
    </head>
    <body>
    <script type="text/javascript">
    <!--
    var t=document.title;
    alert(t);
    document.title="改变的标题二";
    //-->
    </script>
    </body>
    </html>
  • 相关阅读:
    Struts2(二)
    jiqixuexi
    UTF-8
    mysql load
    linux命令(转)
    apache FTP站点源码下载
    linux 命令
    clickhouse 查询
    CDH learning
    nfs
  • 原文地址:https://www.cnblogs.com/sea-stream/p/10422407.html
Copyright © 2011-2022 走看看