问答详情
源自:5-4 下拉菜单

下拉菜单点不出来,求指点

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>

    <base href="<%=basePath%>">

    

    <title>My JSP 'index.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">

<meta http-equiv="cache-control" content="no-cache">

<meta http-equiv="expires" content="0">    

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

<!--

<link rel="stylesheet" type="text/css" href="styles.css">

-->

<link rel="stylesheet" type="text/css" href="<%= basePath %>bootstrap/css/bootstrap.min.css">


  </head>

  

  <body>

    This is my JSP page. <br>

    <div class="dropdown">

    

    <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" >hello<span class="caret"></span></button>

    

    <ul class="dropdown-menu"><li><a href="#">哈哈</a></li><li><a href="#">哈哈</a></li></ul>

    </div>

   

    <script src="<%= basePath %>js/jquery-3.1.1.min.js"></script>

  <script src="<%= basePath %>bootstrap/js/bootstrap.min.js"></script>

  </body>

</html>

bootstrap用的是3.3.7

提问者:sqsq 2018-10-19 23:26

个回答

  • 慕侠2155777
    2018-12-29 14:16:32

    代码没错,稳一点把<%= basePath %>改成你的路径,<meta charset="utf-8" />加一下。代码上没问题,只有路径的可能性错误