posts - 297,  comments - 1618,  trackbacks - 0
< html >
    
< head >
        
< title > document.location </ title >
    
</ head >
    
< body >
        
< b > document.location使用举例 </ b >< p >
        
< script  type ="text/javascript" >
        
<!--
            document.write(
" 当前位置: "   +  document.location  +   " <p> " );
            document.write(
" 当前位置的url路径: "   +  document.location.pathname  +   " <p> " );    
            document.write(
" 当前位置的url协议: "   +  document.location.protocol  +   " <p> " );
            document.write(
" 当前位置的url端口: "   +  document.location.port  +   " <p> " );
            
// 设置新的location
            document.location  =   " http://www.blogjava.net/amigoxie " ;
        
// -->
        
</ script >
    
</ body >
</ html >
     输出结果如下:
     document.location使用举例

     当前位置:file:///C:/Documents%20and%20Settings/112/桌面/test.html

     当前位置的url路径:/C:\Documents%20and%20Settings\112\桌面\test.html

      当前位置的url协议:file:

      当前位置的url端口:
      而后跳转到页面:http://www.blogjava.net/amigoxie

posted on 2007-03-10 15:37 阿蜜果 阅读(4654) 评论(0)  编辑  收藏 所属分类: 芝麻粒知识

只有注册用户登录后才能发表评论。


网站导航:
 
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

      生活将我们磨圆,是为了让我们滚得更远——“圆”来如此。
      我的作品:
      玩转Axure RP  (2015年12月出版)
      

      Power Designer系统分析与建模实战  (2015年7月出版)
      
     Struts2+Hibernate3+Spring2   (2010年5月出版)
     

留言簿(262)

随笔分类

随笔档案

文章分类

相册

关注blog

积分与排名

  • 积分 - 2279824
  • 排名 - 3

最新评论

阅读排行榜

评论排行榜