很多代码在chrome上可以轻松运行,但是在IE上就不行了,收集了一下,贴出来
作者的浏览器是IE9,IE针对IE9
item.remove() ; //这个方法IE没法识别,item获取的节点
item.removeNode(this); //这是IE 的写法
挂上浏览器判断
var agent = navigator.userAgent.toLowerCase();
if(agent.indexOf("edge") > 0){//edge流浪器
item.removeNode(this);
}else if(agent.indexOf("chrome") > 0){
item.remove();
}else if(agent.indexOf("msie") > 0){
item.removeNode(this);
}else if(agent.indexOf("360") > 0){
item.removeNode(this);
}else{
item.removeNode(this)
}
uploadify在IE下双击才能弹出对话框
<input type="hidden" autofocus="autofocus" />
//在form表单里面添加
IE11控制台无法使用解决方案
http://www.microsoft.com/zh-CN/download/details.aspx?id=45134(32)
http://www.microsoft.com/en-us/download/details.aspx?id=45154(64)
chrome下pre标签换行
pre {
white-space: pre-wrap;
word-wrap: break-word;
} //覆盖默认的pre样式
获取url后面的参数
function GetQueryString(name)
{
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null)return unescape(r[2]); return null;
};
alert(GetQueryString('filename'))
filename:参数名,alert参数值