您现在的位置:首页 >> 前端 >> 内容

easyui-textbox即时取值办法,实时性高于onChange

时间:2017/7/13 11:52:46 点击:

  核心提示:easyui-textbox即时取值办法,实时性高于onChange。easyui-textbox的onChange方法,只能在按下回车或去焦点时触发。下面说一种边输入边触发的解决方案:建立easyu...

easyui-textbox即时取值办法,实时性高于onChange。easyui-textbox的onChange方法,只能在按下回车或去焦点时触发。下面说一种边输入边触发的解决方案:

建立easyui-textbox控件:

<input id="flashcodes0_1605101044" data-cke-saved-name="flashcodes0" name="flashcodes0" class="easyui-textbox" data-options="required:true" "="">
JS取值代码:
$("input",$("#flashcodes0_1605101044").next("span")).keyup(function(event){
        var v = $('#flashcodes0_1605101044').next().children().val();
	alert(v);
});

Tags:EA AS SY YU 
作者:网络 来源:xcg8818的博客