IE8 兼容性问题总结

使用背景

  1. 开发工具是 IntelliJ IDEA 开发工具
  2. 电脑上必须安装 VMware Workstation 虚拟机
  3. 虚拟机中需要安装win 7 操作系统,使用win7 默认浏览器就是IE8

常见问题

1) URL 请求失效问题

原因分析:
IE8 打开地址的时候,把地址缓存了,如果再次请求的时候,会使用缓存的地址,就不会进行请求操作
处理方式:
通过在请求地址后面加时间来控制:
示例:

`url: httphost+"/cusaddb/userlist?"+new Date().getTime(),
		type: "get",
		dataType: "json",
		data:{
			departId:selectDepartId,
			searchParmStr:searchParmStr,
			pageIndex:pageIndex,
			pageSize:pageSize
		},`
	

2)中文文件导出操作提示404错误

背景:
IE8 下英文导出可以,中文导出提示404
处理方式:
把输入内容转码:转码方法是把内容包括在encodeURIComponent 方法中。
示例:

var url = httphost + '/cusaddb/userListExp?'+'departId=&searchParmStr='+encodeURIComponent(searchParmStr);
				//window.location.href = url;
				openFileClick(url);				
function openFileClick(href) {
	var a = document.createElement('a');
	a.setAttribute('href', href);
	a.setAttribute('id', 'startTelMedicine');
	// 防止反复添加
	if (document.getElementById('startTelMedicine')) {
		document.body.removeChild(document.getElementById('startTelMedicine'));
	}
	document.body.appendChild(a);
	a.click();
}

3)需要删除console.log()

4)分辨率不适配问题

需要依据具体的分辨率来解决


@media screen and (max-width: 1200px){
	.address-tit-search{
		width: 220px;
	}
	.address-tit-search input{
		width: 124px;
	}
	.address-user-items{
		width: 220px;
	}
	.fixed-table-container table {
		width: 70%;
	}
	.address-branch-wrap{
		width: 980px;
	}
}
@media screen and (min-width: 1200px){
	.address-tit-search{
		width: 280px;
	}
	.address-tit-search input{
		width: 193px;
	}

	.address-user-items{
		width: 280px;
	}
	.fixed-table-container table {
		width: 100%;
	}
	.address-branch-wrap{
		width: 920px;
	}
}

IE8 下插件使用

1)文件附件上传

目前找到的解决方式是使用:WebUpload 这个组件

2)IE8 下前端框架问题

3)隐藏控件的使用

隐藏控件不能直接在input 里增加hidden ,需要设置type=hidden

IE8 不兼容属性

1)unset 属性:不设置样式信息

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xunbaogang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值