javascript css styleFloat和cssFloat
作者:bea
下面是兼容性代码 代码如下: 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+'e
下面是兼容性代码
代码如下:
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.';
}
}
有用 | 无用
代码如下:
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中的undefined 与 null 的区别 补充篇
- javascript+iframe 实现无刷新载入整页的代码
- js select常用操作控制代码
- js实现的日期操作类DateTime函数代码
- js 翻转颜色实现代码
- javascript json2 使用方法
- jQuery 选择器理解
- jQuery 学习入门篇附实例代码
- Jquery Ajax学习实例4 向WebService发出请求,返回实体对象的异步调用
- Jquery Ajax学习实例3 向WebService发出请求,调用方法返回数据
- javascript 二维数组的实现与应用
- JavaScript 中文转拼音实现代码 有些bug
- Jquery Ajax 学习实例2 向页面发出请求 返回JSon格式数据
- jQuery MD5加密实现代码
- javascript将ip地址第四段用星号代替的两种方法
- javascript和jquery分别实现的九九乘法表代码
- [原创]js获取数组任意个不重复的随机数组元素
- javascript 用记忆函数快速计算递归函数
- JS 密码强度验证(兼容IE,火狐,谷歌)