これで、アラートボックスにjQuery変数の値を取得したいと考えています。私は何かを試しましたが、これは私に期待どおりの結果を与えていません。確認テキストにjquery変数の値を使用する方法
$(document).ready(function() {
$("#submit").click(function() {
var dataString = {
amount: $("#amount").val()
};
var getamt = dataString.amount;
$.confirm({
title: 'Confirm!',
content: 'Are you sure you want to transfer $"'.getamt.'" to wallet?', // not getting the result
buttons: {
confirm: function() {
$.ajax({
type: "POST",
dataType : "json",
url: "add-funds-process.php",
data: dataString,
cache: true,
beforeSend: function(){
$("#submit").hide();
$("#loading-rent").show();
$(".message").hide();
},
success: function(json){
setTimeout(function(){
$(".message").html(json.status).fadeIn();
$('#wallet').html('$' + json.wallet);
$('#balance').html('$' + json.balance);
$("#submit").show();
$("#loading-rent").hide();
},1000);
}
});
},
cancel: function() {
$.alert('<span style="font-size: 23px">Upgrade Cancelled!</span>');
}
}
});
return false;
});
});
あなたの熟練した人達が私にこれを手伝ってもらえますか?私は感謝するでしょう。
....あなたを助けるかもしれない; '意志エラーを投げる。 –
はあなたがphp lolを使用しようとしているようです。しかし、はい、Kartikeyaが言ったことをしてください。 –
ありがとう..問題を解決しました:) –