ich diese Javascript-Methode haben eine jquery Bestätigungsdialogfeld setzen und ich möchte Jquery Dialogfeld zur Bestätigungwie für JavaScript-Methode
function editcart(id,code,stock_qw,stock_rtq,pack){
if((stock_qw%pack) != 0){
if(!x) return false;
}
}
Ich habe dieses jquery dialogbox und ich bin etwas verwirren setzen, wie man es zusammen
$('<div></div>').appendTo('body')
.html('<div><h6>Yes or No?</h6></div>')
.dialog({
modal: true,
title: 'message',
zIndex: 10000,
autoOpen: true,
width: 'auto',
resizable: false,
buttons: {
Yes: function() {
doFunctionForYes();
$(this).dialog("close");
},
No: function() {
doFunctionForNo();
$(this).dialog("close");
}
},
close: function (event, ui) {
$(this).remove();
}
});
//$('#msg').hide();
function doFunctionForYes() {
alert("Yes");
$('#msg').show();
}
function doFunctionForNo() {
// alert("No");
$('#msg').show();
}
}
hat jemand bessere idee, wie das funktioniert?
Geben Sie 'id' auf' $ ('
') 'wie' $ (' ') 'und dann versuche es als '$ (" # dialog ") zu öffnen. dialog ('open');' –