使用jquery提交表单后Jquery不发送帖子链接?

时间:2013-10-24 14:02:57

标签: javascript jquery

您好朋友这是我的代码,代码正在运行,表单是提交的,然后发帖链接不发送请帮忙。

$(function(){
    $("#pitch_image_path_browseiser").live("change",function(){
       $("#pitch_image_path_form").attr("id","pitch_image_path_formliveset");
            $("#pitch_image_path_formliveset")[0].submit(function(event){
                event.stopPropagation(); 
                event.preventDefault();
                   alert("call");
            $.post("submit_investorform.php",{'flage':'getallimagesfromselectedid','form':'pitch_image_path_form'},function(result){
                $("#pitch_image_path_showalldatafromid").html(result);
            });
          });
         });

      });

谢谢

1 个答案:

答案 0 :(得分:1)

亲爱的Rock Developer请试用此代码。这对我来说是完全有用的。

$("#pitch_image_path_browseiser").live("change",function(){
    $("#pitch_image_path_form").ajaxSubmit({ success: function(){ 
            $.post("submit_investorform.php",{'flage':'getallimagesfromselectedid','form':'pitch_image_path_form'},function(result){
                    $("#pitch_image_path_showalldatafromid").html(result);
                });
     } });
});

请检查此链接这是教程。

http://malsup.com/jquery/form/