Marydon20170307

jquery 获取css position的值

CreateTime--2018年5月28日14:03:12

Author:Marydon

1.情景展示

<div id="aa" style="position:relative">测试</div>

2.实现方式

1.方式一:使用javascript获取

window.onload = function() {
    alert(document.getElementById(\'aa\').style.position);
};

2.方式二:使用jquery获取

$(function(){
    alert($(\'#aa\').css(\'position\'));
});

 

 相关推荐:

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2021-09-22
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
猜你喜欢
  • 2021-12-09
  • 2021-11-29
  • 2022-01-31
  • 2021-12-30
  • 2021-08-27
  • 2022-12-23
相关资源
相似解决方案