Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/378.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在jade和bootstrap中创建下拉列表_Javascript_Twitter Bootstrap_Pug - Fatal编程技术网

Javascript 在jade和bootstrap中创建下拉列表

Javascript 在jade和bootstrap中创建下拉列表,javascript,twitter-bootstrap,pug,Javascript,Twitter Bootstrap,Pug,因此,我想做的是在呈现编辑室页面时循环通过传入的数组,并在下拉菜单中显示这些房间 我希望能够从菜单中突出显示房间,然后使用req.body访问突出显示的字段。从这里我知道如何加载新页面等 我不知道如何制作一个下拉菜单,我从这里的另一个问题得到了这个代码,但似乎无法使它工作。我甚至不知道这是否能满足我的需求 editRoom.jade: extends layout block header script(src='http://ajax.googleapis.com/ajax/libs/j

因此,我想做的是在呈现编辑室页面时循环通过传入的数组,并在下拉菜单中显示这些房间

我希望能够从菜单中突出显示房间,然后使用req.body访问突出显示的字段。从这里我知道如何加载新页面等

我不知道如何制作一个下拉菜单,我从这里的另一个问题得到了这个代码,但似乎无法使它工作。我甚至不知道这是否能满足我的需求

editRoom.jade:

extends layout

block header
  script(src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js')
  script(src='js/bootstrap.min.js') 
  script(src='https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js')

block content
  form(method="post", action="/edit")
    div(class="dropdown")
      button(class="btn dropdown-toggle sr-only", type="button" id="dropdownMenu1", data-toggle="dropdown")
        Dropdown
        span(class="caret")
      ul(class="dropdown-menu", role="menu", aria-labelledby="dropdownMenu1")
        li(role="presentation") a(role="menuitem", tabindex="-1", href="#") Action
        li(role="presentation") a(role="menuitem", tabindex="-1", href="#") Another action
        li(role="presentation", class="divider")
        li(role="presentation") a(role="menuitem", tabindex="-1", href="#") Separated link
      script.
        $('.dropdown-toggle').dropdown()
  button(type="submit") Submit
我得到了一个下拉菜单的链接,但它没有指向任何地方

谢谢大家!