1. 程式人生 > >easyui textbox 內容改變事件 增加oninpu 類似事件,

easyui textbox 內容改變事件 增加oninpu 類似事件,

ram epo calculate ret tran tex 內容變化 ejs alc

//======================利用easyui驗證功能,進行內容變化監控=== =============
$(function () {
var CustomerService = $.parseJSON($(‘#CustomerService‘).val());
$.extend($.fn.validatebox.defaults.rules, {
//校驗正整數,並計算碼洋
calculateMY: {
validator: function (value) {
var driverAmount = value * CustomerService.DriverAmountRate;
var Deposit = Math.round(driverAmount * CustomerService.AdvanceRate*100)/100;//預付款
var TransportationExpense = Math.round(driverAmount * CustomerService.FreightRate * 100) / 100;//運費
var AdvancePayment = Math.round(driverAmount * CustomerService.ReceiptDepositRate * 100) / 100;//回執
$(‘#Deposit‘).textbox(‘setValue‘, Deposit);
$(‘#TransportationExpense‘).textbox(‘setValue‘, TransportationExpense);
$(‘#AdvancePayment‘).textbox(‘setValue‘, AdvancePayment);
return true;
},
message: ‘客戶費用參數錯誤‘
}
});

})

easyui textbox 內容改變事件 增加oninpu 類似事件,