jq-supper功能检测

"Hello World, Hello Blog"

Posted by wudimingwo on December 15, 2018

用来检测是否支持一些功能? 用来解决兼容性问题?

1
2
3
4
support = $.support;
            for(key in support) {
              document.write('support.' + key + '=' + support[key] + '<br/>');
            }

image.png

1
2
3
4
5
6
7
8
9
10
11
12
13
support.checkOn=true 兼容性问题?
support.optSelected=true 下拉菜单? 检测默认值是否选中? 检查第一个option?
support.reliableMarginRight=true 检查marginRight计算是否可靠? 
support.boxSizingReliable=true
support.pixelPosition=false
support.noCloneChecked=true
support.optDisabled=true
support.radioValue=true
support.checkClone=true
support.focusinBubbles=false
support.clearCloneStyle=true
support.cors=true
support.ajax=true