new*_*bie 4 html javascript css jquery twitter-bootstrap
我将使用bootstrap来构建我的前端.我也在使用JSP和JSTL
我在互联网上的一些文章中读到的是,应该在正文结束标记之前编写添加外部javascript文件的正确方法,以便更好地优化页面.现在我正在尝试将其应用于引导程序,我所做的是将css引导程序放到外部html文件中:
import_header.html:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="bootstrap-css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="bootstrap-css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="bootstrap-css/bootstrap-responsive.css">
<link rel="stylesheet" type="text/css" href="bootstrap-css/bootstrap-responsive.min.css">
Run Code Online (Sandbox Code Playgroud)
我导入到html的头部像这样:
<jsp:include page="import_header.html" flush="true" />
Run Code Online (Sandbox Code Playgroud)
现在我想用jsbootstrap和jQuerylib 的文件做同样的事情,但我不知道这样做的正确方法是什么.
小智 11
这是推荐的方式,如何放置它们:
例如footer.html
<!-- Placed at the end of the document so the pages load faster -->
<script src="jquery/jquery-2.0.3.min.js"></script>
<script src="bootstrap/bootstrap-2.3.1.min.js"></script>
<script src="myOwn.js"></script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
38731 次 |
| 最近记录: |