zoukankan      html  css  js  c++  java
  • 返回当前网页的url

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <style type="text/css">
    <!--
    body {
    font-size: 12px;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #0099FF;
    font-family: Arial, "宋体";
    }
    tr {
    background-color: #99CC00;
    }
    -->
    </style>
    </head>

    <body>
    <p>蔚蓝希望工作室</p>
    <table width="80%">
      <tr>
        <td width="17%">脚本介绍</td>
        <td width="83%">返回当前网页的URL</td>
      </tr>
      <tr>
        <td>脚本代码</td>
        <td>document.write(document.URL)</td>
      </tr>
      <tr>
        <td>脚本运行</td>
        <td>
    <script language="JavaScript">
    document.write(document.URL)
    </script> 
    </td>
      </tr>
    </table>
    <p>该脚本的价值是在没有服务器技术的情况下通过标签访问的方法向网页传送信息,即在地址栏输入 http://网址#书签,代码将返回相同信息</p>
    <hr>
    <p>Copyright&copy; 2007 Blue Hope Stdio<br>
      <a href="http://bluehope.cn">http://bluehope.cn</a></p>
    </body>
    </html>
  • 相关阅读:
    微软软件
    绘图软件安装出错解决方法
    Windows平台 Faster-RCNN 制作自己的数据集
    POJ2456 Agressive Cows
    P1030 求先序排列
    Luogu P2015二叉苹果树
    P2234 [HNOI2002]营业额统计
    Luogu P1347排序
    Luogu P1038神经网络
    Luogu P1006传纸条
  • 原文地址:https://www.cnblogs.com/zerogo/p/2209275.html
Copyright © 2011-2022 走看看