Js获得非行间样式的值

来源:互联网 发布:移动数据安全 编辑:程序博客网 时间:2024/06/06 11:41
  1. function getStyle(obj, name)
  2. {
  3. if(obj.currentStyle)
  4. {
  5. return obj.currentStyle[name];
  6. }
  7. else
  8. {
  9. return getComputedStyle(obj, false)[name];
  10. }
    </pre><pre name="code" class="javascript">

  11. }
0 0
原创粉丝点击