html
<input type="number" name="xxxx" class="accounting_entry_credit_amount" id="" value="">
js
/**
* 会计分录-借方金额
* @param [description]
* @return {[type]} [description]
*/
$(".accounting_entry_credit_amount").on("input",function(e){
//输入框的值改变时触发
//获取input输入的值
console.log(e.delegateTarget.name);
console.log(e.delegateTarget.value);
}
html
<select name="department" lay-filter="accounting_entry">
<option value="0">A</option>
<option value="1">B</option>
</select>
js
layui.use(['layer', 'jquery', 'form'], function () {
var layer = layui.layer,
$ = layui.jquery,
form = layui.form;
/** 选择会计科目 start*/
form.on('select(accounting_entry)', function(data){
console.log(data)
})
});
html
<input type="text" name="datetime" id="certificate_date" value="2020-09-02" class="layui-input">
js
/**
* 日历
* @type {String}
*/
laydate.render({
elem: '#certificate_date',
type: 'date',
done:function(value,date){
//value, date, endDate点击日期、清空、现在、确定均会触发。回调返回三个参数,分别代表:生成的值、日期时间对象、结束的日期时间对象
console.log(value);
console.log(date);
}
});