<input id="id1" class="easyui-textbox" onchange="fun()">
function fun() {
alert($("#id1").textbox("getText"));
}
The input value is not obtained after the input value in the input box loses focus
迷茫2017-07-05 10:44:53
The change monitoring event of
EasyUI is not written directly in the onchange
event of input
. The onclick
event of input
only monitors the operation of HTML itself, which may not be effective for EasyUI binding. The correct approach is to When binding the EasyUI control, write it in the control configuration:
$('#id1').textbox({
onChange: function(value) {
alert($("#id1").textbox("getValue"));
}
});