Chinaunix首页 | 论坛 | 博客
  • 博客访问: 485703
  • 博文数量: 109
  • 博客积分: 2331
  • 博客等级: 大尉
  • 技术积分: 1062
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-24 21:36
文章分类

全部博文(109)

文章存档

2015年(2)

2013年(1)

2012年(78)

2011年(28)

我的朋友

分类: 系统运维

2012-01-07 17:31:50

在javascript中
window.location.href
表示当前网页的网址

一个小范例:
  1. <html>
  2.   <head>
  3.     <title>事件触发示例</title>
  4.     <script language="javascript">
  5.         function test()
  6.         {
  7.             alert(window.location.href);
  8.         }
  9.     </script>
  10.   </head>
  11.   <body>
  12.        <form action="" method="post">
  13.            <input type="button" value="单击事件测试" onclick="test()">
  14.        </form>
  15.   </body>
  16. </html>
阅读(734) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~