|
|
Understanding Compatibility Modes in Internet Explorer 8
CSS Expression
CSS Expression简述
CSS Expression 是微软的专有技术,只有 Windows 下的 IE 浏览器支持,其他浏览器均对 expression 表达式不识别。
受影响的浏览器
IE6 IE7 IE8(Q)。IE8 标准模式已不再支持 CSS Expression
常用场景
max-width,max-height等position:fixed
Detecting IE6 using features
通过判断 body.style.maxHeight(IE7开始支持 max-width, max-height):
|
|
或者判断 window.XMLHttpRequest 对象:
|
|
除此两个使用特性做检测的方法外,还有条件注释等方法。应用场景比如:置顶工具条或者其他固定位置的元素(position:fixed)
参考资料:
Best practice: escape, or encodeURI / encodeURIComponent
关于 JavaScript 中的 escape、encodeURI、encodeURIComponent 三个函数,答案一针见血。另外,底下的其他回复也很有参考价值。