联系我们
简单又实用的WordPress网站制作教学
当前位置:网站首页 > 网页前端技术 > 正文

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

作者:98wpeu发布时间:2026-07-29分类:网页前端技术浏览:4


导读:测试代码:复制代码代码如下:<!DOCtypehtml><HTMLlang="en"><head><metacharset="...
测试代码:
复制代码 代码如下:
<!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类型的。

标签:返回值器中WebindexcssjQuery


网页前端技术排行
最近发表
网站分类
标签列表