我要在的href里填写一段由window.location.href获得的地址,怎么编写?
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/16 07:51:05
我要在的href里填写一段由window.location.href获得的地址,怎么编写?
看不懂你的意思,猜测是现在href未定,按到时候的网站进行定位再加工href;
这样的情况一般用相对地址就可以了.
你一定要的话,一下一段代码试试:
var str=function(){
var str1=window.location.href;
//下面加入各种操作,如截取部分地址substring();添加部分地址+"";等等.
//这里取添加
str1=str1+"22"
window.location.href=str1
}
222
这样的情况一般用相对地址就可以了.
你一定要的话,一下一段代码试试:
var str=function(){
var str1=window.location.href;
//下面加入各种操作,如截取部分地址substring();添加部分地址+"";等等.
//这里取添加
str1=str1+"22"
window.location.href=str1
}
222
我要在的href里填写一段由window.location.href获得的地址,怎么编写?
window.location.href的用法
window.location.href 和self.location的区别
请问在javascript中top.location.href 与 location.href的区别是什么?
self.location.href的具体用法
window.top.location.href='/index.jsp';
else语句是登录的判断过程,主要代码如下:alert("用户名不能为空!");window.location.href
这个标签里的href属性的
top.contents.location.href
document.location.href.substring
html 里的href 英文全称是什么?
标签里href属性的用法,