bootstrap中的typeahead

来源:互联网 发布:全球经济数据网站 汇通 编辑:程序博客网 时间:2024/05/28 22:12

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  2. <html xmlns="http://www.w3.org/1999/xhtml">  
  3. <head>  
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  5. <link rel="stylesheet" href="./public/bootstrap/css/bootstrap.css">  
  6. <script type="text/javascript" src="public/bootstrap/js/jquery.js"></script>  
  7. <script type="text/javascript" src="public/bootstrap/js/bootstrap.min.js"></script>  
  8. <script type="text/javascript" src="bootstrap/js/bootstrap-typehead.js"></script>  
  9. <title>无标题文档</title>  
  10. </head>  
  11.   
  12. <body>  
  13. <div class="container" style="width:500px; margin:90px;>  
  14.     <input type="text" class="typeahead" data-provide="typeahead" autocomplete="off" data-source='["123","234","345","456","678","789"]' />  
  15. </div>  
  16. <script>  
  17.     $('.typeahead').typeahead()  
  18. </script>  
  19. </body>  
  20. </html>  

效果图:
原创粉丝点击