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

Ext JS implements fuzzy dynamic search example code

零下一度
Release: 2017-05-15 09:34:35
Original
1174 people have browsed it

This article mainly introduces Ext JS to implement the fuzzy dynamic search function of suggested words. Friends who need it can refer to the

code:

new Ext.form.ComboBox({
 store: new Ext.data.JsonStore({
 idProperty: 'VehicleNo',
 url: '../ajax/test.ashx,
 fields: ['VehicleNo', 'phoneNum']
 }),
 id:'querynodesid',
 emptyText:'快速检索',
hiddenName: 'VehicleNo',
 displayField: 'VehicleNo',
 valueField: 'VehicleNo',
 queryParam: 'VehicleNo',
 forceSelection: true,
 hideTrigger: true,
 queryDelay: 500,
 width:100,
 enableKeyEvents: true,
 minChars: 1,
 mode: 'remote',
 listeners: {
 'select': {
 fn: function (combo, record, index)
 {
 var no = Ext.get("querynodesid").dom.value;
 findByKeyWordFiler2(no);
 }
 }
 }
 })
Copy after login

Parameter description:

queryParam: 'VehicleNo', the value entered as the parameter will be passed to the background as the VehicleNo parameter, which can be customized;

test.ashx? The returned parameter format is [{"VehicleNo":"00001","phoneNum":"000002"},{},{}];

'select' means when a certain A callback that needs to be executed when data is retrieved;

This method is suitable for searches with a small amount of data. Searches with a relatively large amount of data may affect performance

[Related recommendations]

1. Special recommendation: "php Programmer Toolbox" V0.1 version download

2. Free js online video tutorial

##3.

php.cnDugu Jiujian (3)-JavaScript Video tutorial

The above is the detailed content of Ext JS implements fuzzy dynamic search example code. For more information, please follow other related articles on the PHP Chinese website!

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!