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

解决方案 »

  1.   

    写错了,是alert($("input[type='text'],[type='password']")) 
    jquery是1.4.4
      

  2.   

    <!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>
      

  3.   

    alert($("input[type='text'],input[type='password']"))  解决