来源: http://blog.csdn.net/kjb000/article/details/7913867
IE的js 中使用Window.location时会忽略base href值
这样写可以解决:
window.location = document.getElementsByTagName("base")[0].getAttribute("href")+ "loc";
获得 base也可以用:
alert("base="+$("#base").attr("href"));
相关推荐
window.location.href页面跳转的用法(区别于redirect)
javascript 打开页面window.location和window.open的区别.docx
详解js location.href和window.open的几种用法和区别.docx
一、location.href常见的几种形式 self.location.href;//当前页面打开URL页面 [removed].href;//当前页面打开URL页面 this.location.href;//当前页面打开URL页面 location.href;// 当前页面打开URL页面 parent....
NULL 博文链接:https://hugang357.iteye.com/blog/1833003
如果D中js这样写 “[removed].href”、”location.href”:D页面跳转 “parent.location.href”:C页面跳转 “top.location.href”:A页面跳转 如果D页面中有form的话, <form>: form提交后D
对window.open进行封装, 使其更好用, 且更兼容, 很多人说window.open不兼容,其实不是, 因为不能直接执行, 必须通过用户手动触发才行;看代码: 代码如下 var openWindow = function(url, options) { var str = ""; ...
javascript中window.confirm这个方法很好用,可以弹出一个确认对话框我们之所以弹出这个对话框,可能就是因为该操作很危险,所以要用户确认。但如果默认选择”确定”,则可能违背了这个原则。 另外,confirm对话框的...
js利用IE通过windowopen方式保存网页部分内容到本地
window.opener.location.href = window.opener.location.href 刷新以winodw.showModelDialog()方法打开的窗口 window.parent.dialogArguments.document.execCommand('Refresh'); 或 Response.Write("<script>...
document 表示的是一个文档对象,windows 表示一个窗口对象。... 发现,这两个的值不一样, document.URL : //www.jb51.net/ windows.location.href ://www.jb51.net/#server 所以,如果要用 fragment 进行
html和js通过window.print()实现调用浏览器打印带背景图片和生成二维码的文件功能;直接下载可用
window.event.keycode值大全,内含javascript中所有键盘键值,查找方便简单。
JavaScript_window.setTimeout()_的详细用法
JavaScript中Window.open参数详解 1、最基本的弹出窗口代码 2、经过设置后的弹出窗口 3、用函数控制弹出窗口 4、同时弹出2个窗口 5、主窗口打开文件1.htm,同时弹出小窗口page.html ...
IE11没有window.attachEvent方法处理方法,文档中有详细说明
window.open使用方法以及参数说明一、window.open()支持环境: JavaScript1.0+/JScript1.0+/Nav2+/IE3+/Opera3+ 二、基本语法: window.open(pageURL,name,parameters) 其中: pageURL 为子窗口路径 name 为子窗口...
除了IE6、IE7之外的所有浏览器都支持这个功能。 数据发送端 首先我们要做的是创建通信发起端,也就是数据源”source”。作为发起端,我们可以open一个新窗口,或创建一个iframe,往新窗口里发送数据,简单起见,我们...