Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 16:11:53
Original
1385 people have browsed it

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!