测试代码:
<!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>
复制代码 代码如下:
<!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类型的。
网友评论文明上网理性发言已有0人参与
发表评论: