2010-08-03 91 views
0

我有一個jquery對話框,可以顯示後點擊單選按鈕。 最後一次可以顯示,但之後我把一些腳本,從對話框提交對話框變得不顯示後點擊radiobutton.this是我的代碼:jquery對話框變得不出現

<script type="text/javascript"> 
    $(document).ready(function() { 
     $('#dialog').dialog({ 
      autoOpen: false 
     }); 
     $("#gen2").click(function() { 
      $("#dialog").dialog('open'); 
      $("#status").hide(); 
     }); 
     $(".defect").click(function() { 
      $("#status").show(); 
     }); 
     $(":button").click(function() { 
      $("#inputdefect").submit() { 
       $.ajax({ 
        type: "post", 
        url: "process1.php", 
        data: "status="+str+"&action=defstat", 
        cache: false, 
        success: function() { 
         $(".defect").removeAttr("checked"); 
         return this; 
        } 
       }); 
      } 
     }); 
    }); 
</script> 

回答

0
$(":button").click(function() { 
     $("#inputdefect").submit() '{' <-- is this typos? 
      $.ajax({ 
       type: "post", 
       url: "process1.php", 
       data: "status="+str+"&action=defstat", 
       cache: false, 
       success: function() { 
        $(".defect").removeAttr("checked"); 
        return this; 
       } 
      }); 
     '}' <-- is this typos? 
    }); 

什麼是你想實現與$(":button").click() ?你有錯誤...

+0

我有jQuery對話框中的兩個提交按鈕。有人告訴我,如果我們在一種形式中有許多按鈕,請使用達特碼來提交。你有什麼想法嗎? – klox 2010-08-03 04:47:23

+0

只是嘗試刪除上面標記的錯別字。這是一個語法錯誤。 – Reigel 2010-08-03 04:56:57