$(function() {
$("#back").click(function() { //返回按鈕事件
location.href = "welcome.html";
});
$("#search").click(function(){
var deptno = $("#deptno").val();
var res = query("select * from emp where deptno=" + deptno + ""); //組裝SQL語句並執行查詢
if(res != null){ //判斷是否有返回值
//var res_2=query("select * from emp where deptno=" + deptno + ");
sessionStorage['deptno'] = deptno; //deptno是要查看員工的部門的編號,把該編號放入sessionStorage,
location.href = "get_dep_emp.html";
}
});
});
</script>
</head>
<body>
<div class="content">
<h2 class="title">查詢部門員工</h2>
<hr />
<table width="90%" align="center" class="tablelist">
<tr>
<td width="45%" align="right">部門編號:</td>
<td><input type="text" id="deptno" /></td>
</tr>
<td colspan="2" align="center">
<input type="submit" value=" 查詢 " id="search" class="button" />
<input type="button" value=" 返回 " id="back" class="button" />
</td>
</table>
</div>
</body>
但是查詢和返回兩個按鈕都沒有響應。。純屬菜鳥,請大神指點
用chrome的console or Firebug看看有錯沒有先