为了账号安全,请及时绑定邮箱和手机立即绑定

使用location.方法的时候不显示


 <script type="text/javascript">


// 对象属性

    // location.href  :获取当前网页的 URL

     document.write("<br>"+"1:"+location.href);


     document.write("<br>"+"2:"+location.hostname);

     document.write("<br>"+"3:"+location.host);

     document.write("<br>"+"4:"+location.hash);

     document.write("<br>"+"5:"+location.pathname);

     document.write("<br>"+"6:"+location.protocol);

     document.write("<br>"+"7:"+location.search);


//  对象方法:(为什么不显示呢)

     document.write("<br>"+"12:"+location.assign());

     document.write("<br>"+"13:"+location.reload());

     document.write("<br>"+"14:"+location.replace());


 </script>


正在回答

2 回答

后面三个方法对窗口一顿操作,而且还有参数,你这……

0 回复 有任何疑惑可以回复我~

你把他粘到你自己的编译器试试

搜索

复制

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

使用location.方法的时候不显示

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号