光驱打不开-鼠标连点
![ie6 0官方下载](/uploads/image/0114.jpg)
2023年4月4日发(作者:web测试面试题)
querySelector和querySelectorAll在IE6和IE7下的兼容性问题
if(!electorAll){
electorAll=function(selectors){
varstyle=Element('style'),elements=[],element;
Child(style);
document._qsa=[];
t=selectors+'{x-qsa:expression(document._qsa&&document._(this))}';
By(0,0);
Child(style);
while(document._){
element=document._();
Attribute('x-qsa');
(element);
}
document._qsa=null;
returnelements;
};
}
if(!elector){
elector=function(selectors){
varelements=electorAll(selectors);
return()?elements[0]:null;
};
}
//⽤于在IE6和IE7浏览器中,⽀持electorAll⽅法
varqsaWorker=(function(){
varidAllocator=10000;
functionqsaWorkerShim(element,selector){
varneedsID===="";
if(needsID){
++idAllocator;
="__qsa"+idAllocator;
}
try{
electorAll("#"++""+selector);
}
finally{
if(needsID){
="";
}
}
}
functionqsaWorkerWrap(element,selector){
electorAll(selector);
}
//Returntheonethisbrowserwantstouse
Element('div').querySelectorAll?qsaWorkerWrap:qsaWorkerShim;
})();
更多推荐
ie6 0官方下载
发布评论