请问我在myeclipse下搭建了SSH框架后,我做jsp网页为什么js和css都没效果 10
<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%><%Stringpath=request....
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>交院精品课程学习网</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 href="css/index.css" rel="stylesheet" type="text/css"/>
<script language="javascript" type="text/javascript" src="js/nav_js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="js/nav_js/jquery.panelslider.js"></script>
<script language="javascript" type="text/javascript" src="js/nav_js/jquery.panelslider.min.js"></script>
<style>
body{
background-image:url(image/bg_pic.jpg);margin:0;padding:0;
text-align:center;
}
#container {
width: 100%;position:relative;
}
#nav{
min-width:700px;
}
h1, h2 { margin-top: 0; }
p { color: #ccc; line-height: 1.5; }
#page { width: 940px; height: 400px; padding: 20px; margin: 0 auto; background: white; }
.panel {
display: none;
width: 220px;
padding: 20px;
background-color: #333;
color: #fff;
box-shadow: inset 0 0 5px 5px #222;
}
</style>
</head>
<body>
<form>
<div id="container">
<div id="nav">
<ul>
<li>123</li>
<li>123</li>
</ul>
</div>
<a id="left-panel-link" href="#left-panel">打开左面板</a> |
<a id="right-panel-link" href="#right-panel">打开右面板</a>
<!-- Left panel -->
<div id="left-panel" class="panel">
<h2>Left panel</h2>
<p>Click anywhere outside panel to close it.</p>
</div>
<!-- Right panel -->
<div id="right-panel" class="panel">
<h2>Right panel</h2>
<p>Clicking outside this panel wont close it because <code>clickClose = false</code></p>
<button id="close-panel-bt">Close</button>
</div>
</div>
<script>
$('#left-panel-link').panelslider();
$('#right-panel-link').panelslider({side: 'right', clickClose: false, duration: 200 });
$('#close-panel-bt').click(function() {
$.panelslider.close();
});
</script>
</form>
</body>
</html>
css和js都没用,路径是对了的 展开
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>交院精品课程学习网</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 href="css/index.css" rel="stylesheet" type="text/css"/>
<script language="javascript" type="text/javascript" src="js/nav_js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="js/nav_js/jquery.panelslider.js"></script>
<script language="javascript" type="text/javascript" src="js/nav_js/jquery.panelslider.min.js"></script>
<style>
body{
background-image:url(image/bg_pic.jpg);margin:0;padding:0;
text-align:center;
}
#container {
width: 100%;position:relative;
}
#nav{
min-width:700px;
}
h1, h2 { margin-top: 0; }
p { color: #ccc; line-height: 1.5; }
#page { width: 940px; height: 400px; padding: 20px; margin: 0 auto; background: white; }
.panel {
display: none;
width: 220px;
padding: 20px;
background-color: #333;
color: #fff;
box-shadow: inset 0 0 5px 5px #222;
}
</style>
</head>
<body>
<form>
<div id="container">
<div id="nav">
<ul>
<li>123</li>
<li>123</li>
</ul>
</div>
<a id="left-panel-link" href="#left-panel">打开左面板</a> |
<a id="right-panel-link" href="#right-panel">打开右面板</a>
<!-- Left panel -->
<div id="left-panel" class="panel">
<h2>Left panel</h2>
<p>Click anywhere outside panel to close it.</p>
</div>
<!-- Right panel -->
<div id="right-panel" class="panel">
<h2>Right panel</h2>
<p>Clicking outside this panel wont close it because <code>clickClose = false</code></p>
<button id="close-panel-bt">Close</button>
</div>
</div>
<script>
$('#left-panel-link').panelslider();
$('#right-panel-link').panelslider({side: 'right', clickClose: false, duration: 200 });
$('#close-panel-bt').click(function() {
$.panelslider.close();
});
</script>
</form>
</body>
</html>
css和js都没用,路径是对了的 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏10(财富值+成长值)
2个回答
展开全部
是不是被拦截了?在配置里面把js和css文件配成不被拦截的文件
更多追问追答
追问
就是不需要验证么?我也设置的了,还是不行
追答
有用拦截器吗?拦截器那里也要配。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询