0

我正在尝试在 twitter bootstrap 中使用 typehead。

http://twitter.github.com/bootstrap/javascript.html#typeahead

如果假设我想显示特定文本文件中的元素。我怎样才能做到这一点?我知道基本的字头,但是如何从文本文件中检索字头的值?

例如像:

<input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4"
       data-source='["Apples","Bananas","Cherries","Dates","Eggplants","Figs","Grapes",
       "Honeydew","Kiwi","Mango","Peaches","Plums","Raspberries","Strawberries","Watermelon","Zucchini"]'>

这是我的搜索框代码,我只想集成它。

    <br>
  <br><br><br><br><br> <br> <br> <br>
    <div class= "well">
  <center>
<div class="content-inner">
  <h1 class="pump-up">Find your Desired Course and Learn!<br> <strong>Boom, it's that easy.</strong></h1>
  <div class="full-search-bar">
    <ul class="item-stream unstyled search-input-stream">
      <li class="stream-item stream-header search-input-item">
        <form class="form-inline search-form" action="webcrawler.php" method = "post">
          <input class="xlarge" name="coursename1" type="text" placeholder="Java,Python,Ruby..You name it & We got it!" />
          <button class="btn btn-large btn-inverse" type="submit"><i class="icon-search icon-white"></i></button>
        </form>
    </li>
    </ul>
    </div>
  </div>
</center>
</div>

谢谢!

4

0 回答 0