>

freejs首页

搜索推荐 输入框推荐相近搜索 可以带图标

Classic Style

The classic style of auto-suggest. It takes just one parameter, the URL to retrieve the data.

Public figure name :

Using ID Field

The auto-suggest can also return an ID. You just need to prepare the input element for storing it and then pass one additional parameter, idField.

Public figure name : ID :

Image Thumbnail And Additional Description

The auto-suggest can also display image thumbnail and additional description. You have to pass two additional parameters, showThumbnail, and showDescription and then set their value to true.

Public figure name :
Note :

Image thumbnail's width and height can be set from the CSS file.
For a better appearance, I recommend that all images must have the same width and height.


Other Options

These are the other usefull parameters which you can use. Here they are.

  • width. Basically, the width will be automatically adjusted to textfield's width. By using this parameter, you can customize the auto-suggest width to suit your need.
  • minChars. By default, the auto-suggest will appear if you type the first letter. You can set the number characters typed to trigger the auto-suggest to appear by using this parameter.
  • submitOnSelect. By setting this parameter value to true, the form will be submitted once you click one of the item in the auto-suggest list.
Public figure name : ID :

Callback Function (New)

For this new version, you can use one callback function which can be used via onSelected parameter. This callback function will be executed when you made a selection on one item (by clicking it or pressing 'Enter'). By using this callback feature you can retrieve the selected object to be used later in your code.

Public figure name :
ID :
Profession :
Picture :

Note :

This callback feature can also be used as the alternative to get the ID of the selected item and also submit the form after you made the selection.