实现代码如下:
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.';
}
}
以上就是【javascript css styleFloat和cssFloat】的全部内容了,欢迎留言评论进行交流!