日期:2014-05-16  浏览次数:20308 次

$("input[@type='text'],[@type='password']")iE7不支持?
alert($("input[@type='text'],[@type='password']"))在firefox下能取得是对象,在IE7下是undefined,请问是什么情况,怎么解决?

------解决方案--------------------
<!DOCTYPE HTML>
<html>
<head>
<meta charset="gb2312" />
<title></title>

<script src="http://code.jquery.com/jquery-latest.js"></script>

</head>
<body>
<input type="password" value="123" />
<script>
alert( $(':input[type=password]').val() ) </script>
</body>
</html>

------解决方案--------------------
不支持。。。