首页 > 编程 > JavaScript > 正文

javascript css styleFloat和cssFloat

2019-11-21 00:40:33
字体:
来源:转载
供稿:网友
下面是兼容性代码
复制代码 代码如下:

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.';
}
}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表