Home >Web Front-end >JS Tutorial >EasyUI, click to open the edit box and get the focus of the edit box_jquery

EasyUI, click to open the edit box and get the focus of the edit box_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 16:11:531450browse

Copy code The code is as follows:

onClickRow: function(rowIndex, rowData){
var editor = $('#datagrid').datagrid('getEditor', {index:rowIndex,field:"buyNum"});
​ editor.target.focus();
}

Click on a line to open the edit box and place the cursor in the edit box.

rowIndex: It is the row index of the current page of the row that opens the edit box, starting from 0;

buyNum: is the name of the field that opens the edit box.

The above is a little tip summarized by me, I hope you all like it.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn