JQUERY $("form:first").submit();在IE6下面不执行,咱整

解决方案 »

  1.   

    $("form:eq(0)").submit();
    这样就可以了
      

  2.   

    code=CSS]$("form").get(0).submit();[[/code]
      

  3.   


    $("form").get(0).submit();
      

  4.   


    这个是我的代码function fixBlockID(strBlockID)
    {
        $("#txtBlockID").val(strBlockID);
        $("form:first").submit();
    }
      

  5.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <style>
      p { margin:0; color:blue; }
      div,p { margin-left:10px; }
      span { color:red; }
    </style>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    </head>
    <body>
    <p>Type 'correct' to validate.</p>
    <form action="javascript:alert('success!');">
        <div>
          <input type="text" />      <input type="submit" />
        </div>
    </form>
      <span></span>
    <script>
        $("form:first").submit(function() {
          if ($("input:first").val() == "correct") {
            $("span").text("Validated...").show();
            return true;
          }
          $("span").text("Not valid!").show().fadeOut(3000);
          return false;
        });
    </script>
    </body>
    </html>我这个代码是可以的楼主对照一下