1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| function IsMyBorder(d){
var def_b,def_s=null,db=document.body;
if(d.currentStyle)
def_b=d.currentStyle.borderLeftWidth+
d.currentStyle.borderTopWidth+
d.currentStyle.borderRightWidth+
d.currentStyle.borderBottomWidth+
d.currentStyle.borderStyle;
else
def_b=window.getComputedStyle(d,null).getPropertyValue('border-left-width')+
window.getComputedStyle(d,null).getPropertyValue('border-top-width')+
window.getComputedStyle(d,null).getPropertyValue('border-right-width')+
window.getComputedStyle(d,null).getPropertyValue('border-bottom-width')+
window.getComputedStyle(d,null).getPropertyValue('border-style');
if(db.currentStyle)
def_s=db.currentStyle.borderLeftWidth+
db.currentStyle.borderTopWidth+
db.currentStyle.borderRightWidth+
db.currentStyle.borderBottomWidth+
db.currentStyle.borderStyle;
else
def_s=window.getComputedStyle(db,null).getPropertyValue('border-left-width')+
window.getComputedStyle(db,null).getPropertyValue('border-top-width')+
window.getComputedStyle(db,null).getPropertyValue('border-right-width')+
window.getComputedStyle(db,null).getPropertyValue('border-bottom-width')+
window.getComputedStyle(db,null).getPropertyValue('border-style');
return (def_b!=def_s);
} |
Partager