0
這個div [#divSaveAndDistribute]只出現一次。我如何讓它在任何時候被觸發?謝謝jquery:javascript對話框只出現一次
pic1 = new Image(16, 16);
pic1.src = "images/loader.gif";
$(document).ready(function(){
$("#save").live('click',function() {
//alert("you just clicked me");
var table="products_tb";
$("#status").html('<img src="images/loader.gif" align="absmiddle"> Checking empty fields...');
$("#dialog-confirm").dialog("open");
var dataString = 'table='+table;
//alert(dataString);
//$("#alert").fadeIn(200).html('<img src="images/load/ajax-loader.gif" align="absmiddle">');
$.ajax({
type: "POST",
url: "checkEmpty.php",
data: dataString,
cache: false,
success: function(html)
{
// $(「#alert」)。fadeOut(200);
// $(".confirm").easyconfirm();
$("#status").html(html);
// $(「#pled」)。val(「」);
}
//clear_form_elements("form#CommentForm");
});
});
$("#dialog:ui-dialog").dialog("destroy");
$("#dialog-confirm").dialog({
autoOpen: false,
resizable: false,
height:200,
width:400,
modal: true,
buttons: {
"check": function() {
$(this).dialog("close");
},
Cancel: function() {
$(this).dialog("close");
//alert("you just offed me");
$('#divSaveAndDistribute').show();
}
}
});
`列表...它似乎隨時被觸發...`?相同的「它」還是兩個不同的「它」? – 2011-12-16 15:35:32