self.location.href的具体用法

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/13 00:29:15
self.location.href的具体用法

self.location.href的具体用法
self.location.href的具体用法

self.location.href的具体用法
self指代当前窗口对象,属于window最上层的对象;
location.href 指的是某window对象的URL地址.
self.location.href指当前窗口的URL地址,去掉self默认为当前窗口的URL地址.
一般用于防止外部引用,如果你的网页地址是:
if(top.location.href!=self.location.href){
location.href="http://www.a.com";
}
来转向你的页面,
top指代的是主体窗口,这里top.location.href返回http://www.b.com;
http://www.b.com!=http://www.a.com,返回为真(true),则网页重定向到你的网页,做到防盗用的作用.

self.location.href的具体用法 window.location.href 和self.location的区别 if (top = self)top.location.href = Admin_Login. document.location.href.substring document.location.href.toLowerCase()是什么意思 我要在的href里填写一段由window.location.href获得的地址,怎么编写? 请问在javascript中top.location.href 与 location.href的区别是什么?就是有一个点击事件onclick,我朋友是用top.location.href 我觉得用location.href就好了,为什么要加个top呢?请问JS高手指教下,这两者的区别在 window.location.href的用法用window.location.href跳转时传递两个值怎么写这样写传过的值是dr=123drr=234正确写法怎么写? js中if (top.location = self.location) {top.location=self.location;}是什么意思. else语句是登录的判断过程,主要代码如下:alert(用户名不能为空!);window.location.href=login.jsp; alert(请填写密码!);window.location.href=login.jsp; alert(用户名不存在!);window.location.href=login.jsp; alert document.location.href与document.frm.action有什么差别? document.location.href='CouponAction.do?method=什么作用,含义 onclick={window.location.href='deleteDataAction.jsp?id='} 谁能帮我解释一下 地壳的____或下降都属于______.2yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhttp://zhidao.baidu.com/q?ct=20&qid=56474652&tn=iksupdetail&lu= + escape(location.href) + 2 window.top.location.href='/index.jsp';我打开华中科技大学的HUB主页就显示这个,是啥意思?(我用搜狗浏览器打开就不会哦!就正常了)解释解释啥意思. html 里的href 英文全称是什么? 标签里href属性的用法, html 里的href 英文全称是什么?