JS搜索功能显示类似的搜索结果

时间:2016-07-04 02:52:34

标签: javascript search

我在js中有大约100个术语(没有数字)保存为变量。

#include <asf.h>
#define LED PIN_PA01

int main (void)
{
  system_init();
  delay_init();
  struct port_config config_port_pin;
  config_port_pin.direction = PORT_PIN_DIR_OUTPUT;
  port_pin_set_config(LED, &config_port_pin);

  while(1)
  {
    port_pin_toggle_output_level(LED);
    delay_ms(100);
  }
}

我有一个简单的搜索字段:var terms = [ALL TERMS];

我试图这样做,以便当用户开始输入一个字母时,它会自动带来与输入内容匹配的字词。

之前我见过这种功能。如果有人能指出我正确的方向以实现这一点,我将非常感激。

非常感谢!

1 个答案:

答案 0 :(得分:1)

如果您希望进行简单搜索,请使用以下代码:

ImageView
相关问题