<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'modifysub.jsp' starting page</title>
</head>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet"/></link>
<script src="bootstrap/js/jquery.min.js" type="text/javascript"></script>
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script>
$().ready(function(){
$("#buxuan").click(function(){
alert(65);
var subid =$("#subget").val();
location.href="showClass?type=modifysub&subid="+subid+"&classid="+classid+"";
});
});
</script>
<body>
<%int classid=(Integer)request.getAttribute("classid");
%>
<div style="width:650px;margin:20px auto;">
<form >
当前班级:<span style="color:#666;font-size:24px;"><%=request.getAttribute("classname") %></span>
<hr style="color:#666;">
<div style="width:200px;height:250px;float:left;">
<select multiple class="form-control" scrolling="no" id="subget" style="width:200px;height:250px;" >
<%List<Subject> list=(List<Subject>)request.getAttribute("sublist");
for(int i=0;i<list.size();i++){
%>
<option style="font-size:20px;" value="<%=list.get(i).getSubid()%>"><%=list.get(i).getSubjectname() %></option>
<%} %>
</select>
</div>
<input type="button" id="buxuan" value=">>>" style="float:left;margin-top:70px;margin-left:50px;" />
<input type="button" id="xuan" value="<<<" style="float:left;margin-top:150px;margin-left:-40px;" />
<div style="width:200px;height:250px;border:1px black solid;margin-left:350px;">
<select multiple class="form-control" scrolling="no" name="subnoget" style="width:200px;height:250px;" >
<%List<Subject> nochoice=(List<Subject>)request.getAttribute("nochoice");
for(int i=0;i<nochoice.size();i++){
%>
<option style="font-size:20px;" value="<%=nochoice.get(i).getSubid()%>"><%=nochoice.get(i).getSubjectname() %></option>
<%} %>
</select>
</div>
</form>
</div>
</body>
</html>
代码就是这样 点击那个叫sendno的按钮可以获得alert弹框,就说明进了点击事件,但是就是不跳转页面,地址栏也没有变化,是什么原因???先谢谢各位大神。。