jQuery获取css z-index在各种浏览器中的返回值
测试代码:
代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="GBK" />
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>jQuery Css Test</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
alert(typeof jQuery('#csszindex').css('z-index'));
});
</script>
</head>
<body>
<span id="csszindex" style="z-index:100px;">test</span>
</body>
</html> 弹出框显示信息:
IE8:

IE7:

IE6:

Firefox:

Chrome:

Opera:

后面的几个都一样,都返回的是String类型的。
相关推荐
teresalxm 2020-07-25
wallowyou 2020-06-28
nicepainkiller 2020-05-05
淡风wisdon大大 2020-04-21
lcyangcss 2019-12-23
maiktom 2019-12-07
somboy 2019-10-23
libowen0 2016-04-19
zhanghaibing00 2019-09-08
王景迁 2019-06-29
ajhongshaorou 2019-06-28
张大晴 2016-04-19
adeyi 2019-06-27
wolaizheli 2014-09-05
walliam 2014-07-31