×

jQuery获取css z-index在各种浏览器中的返回值

作者:Terry2017.02.03来源:Web前端之家浏览:12590评论:0
关键词:JQueryJS
测试代码:
复制代码 代码如下:

<!DOCtypehtml>
<HTML lang="en">
<head>
<metacharset="GBK" />
<meta http-eqUIv="Content-Type" content="text/html; charset=gbk" />
<title>JQueryCSS Test</title>
<script type="text/javascript" src="jQuery.JS"></script>
<script type="text/JavaScript">
jquery(document).ready(function(){
alert(typeofjquery('#csszindex').css('z-index'));
});
</script>
</head>
<body>
<span id="csszindex" style="z-index:100px;">test</span>
</body>
</html>

弹出框显示信息:

ie8:

IE8

ie7:

IE7

IE6:

IE6

firefox:

Firefox

Chrome

Chrome

Opera:

Opera

后面的几个都一样,都返回的是String类型的。

您的支持是我们创作的动力!
温馨提示:本文作者系Terry ,经Web前端之家编辑修改或补充,转载请注明出处和本文链接:
https://jiangweishan.com/article/svg1486051200580.html

网友评论文明上网理性发言已有0人参与

发表评论: