0
$("#slider-range-max-day-count").slider({
range: "max",
min: 1,
max: 365,
value: 1,
animate: "fast",
slide: function (event, ui) {
$("#dayCount").text(ui.value);
var invPackageValue = $('#investmentPackage').text();
var dayValue = ui.value;
<?php
$compoundInterest = $CI->compound_int($package, $day, $interest_rate->static_interest);
?>
$("#sliderResult").text(<?php echo $compoundInterest;?>);
}
});
在功能$CI->compound_int($package, $day, $interest_rate->static_interest);
如何傳遞invPackageValue和dayValue代替$package
和$day
參數。傳遞jquery的變量PHP函數作爲參數
這是一個PHP文件? –
是的,這是php文件 – Ashish
您應該使用ajax將jquery vaiables傳遞給PHP,然後您可以將它作爲參數傳遞 –