Twitter Bootstrap Typeahead来自文本文件

时间:2012-11-27 19:20:41

标签: twitter-bootstrap

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

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

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

例如:

<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>

谢谢!

0 个答案:

没有答案