Please call 'setSelectionRange' method to select text on the textbox component.
$('#t').textbox('setSelectionRange', {start:2,end:4});
var range = $('#t').textbox('getSelectionRange');
console.log(range);
hai Jarry,
thx for your reply,
i did what you suggested, but still not working
<input name="t" id="t" style="width:300px" type="text" class="easyui-textbox">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="dbu()">test</a>
<script>
function dbu(){
$('#t').textbox('setSelectionRange', {start:2,end:4});
var range = $('#t').textbox('getSelectionRange');
console.log(range);
}
</script>
console output
and i read the documentation, and the method setSelectionRange and getSelectionRange didnt exist