开发者

jquery - strange behavior in IE

** Rephrased **

Fails on Load in IE


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Test</title>
        <script type="text/javascript" src="lib/jquery/jquery-1.3.2.js"></script>
        <script type="text/javascript">            
            $(document).ready(function(){                
                $(document).find('form').attr('id', 'FRM_0');
            });
        </script>
    </head>
    <body>
        <h1>jQuery Dynamic Form</h1>
        <form id="testForm" method="post开发者_如何转开发" action="#" onsubmit="return false;">
            <input type="hidden" name="id" value="" />
        </form>
    </body>
</html>


$('input[type=hidden][name=id]');

Should get you exactly what you want, and it should work in IE. (If I could see the Javascript code you are using, I might be able to be more helpful.)


This is an issue in jQuery. The only resolution I found so far is by changing 'id' to someother value. Create a ticket http://dev.jquery.com/ticket/6336.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜