javascriptcssstyleFloat和cssFloat_javascript技巧
來源:懂視網
責編:小采
時間:2020-11-27 20:47:55
javascriptcssstyleFloat和cssFloat_javascript技巧
javascriptcssstyleFloat和cssFloat_javascript技巧:下面是兼容性代碼 代碼如下: LTFunction.setFloatStyle=function(obj,style) { var sty=obj.style; if('cssFloat' in sty){ obj.style.cssFloat=style; }else if('styleFloat' in sty){ obj.style.st
導讀javascriptcssstyleFloat和cssFloat_javascript技巧:下面是兼容性代碼 代碼如下: LTFunction.setFloatStyle=function(obj,style) { var sty=obj.style; if('cssFloat' in sty){ obj.style.cssFloat=style; }else if('styleFloat' in sty){ obj.style.st

下面是兼容性代碼
代碼如下:
LTFunction.setFloatStyle=function(obj,style)
{
var sty=obj.style;
if('cssFloat' in sty){
obj.style.cssFloat=style;
}else if('styleFloat' in sty){
obj.style.styleFloat=style;
}else{
throw 'set float style:'+style+'error.';
}
}
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
javascriptcssstyleFloat和cssFloat_javascript技巧
javascriptcssstyleFloat和cssFloat_javascript技巧:下面是兼容性代碼 代碼如下: LTFunction.setFloatStyle=function(obj,style) { var sty=obj.style; if('cssFloat' in sty){ obj.style.cssFloat=style; }else if('styleFloat' in sty){ obj.style.st