哈哈,你一定是在执行数据库操作之前执行了javascript
解决方案 »
- eclipse怎么配置?
- struts2的Iterator,property标签问题
- 不能发现javabean~在线急等
- JSP中如何像PHP的file_get_content那样获取页面源文本?
- 如何实现当DB的一个表,有记录追加时,在客户端出现一个提示框,提示有记录被追加。
- 在线播放怎么做?
- 关于printDriver的打印问题
- 【请教】 关于访问其他项目的路径问题
- 我写了一个用spring3.0的JdbcTemplate访问mysql数据库的方法,调用时出现如错误,请高人指点:
- 用JSP开发,用那个免费的服务器好?
- 为什么我在TomCat的例子的目录下,调我自己的servlet他报下面的错
- IBM的产品好次,不知道大家是否有同感
try{
Rst=Stmt.executeQuery("select faculty_sub_num from teach_faculty where faculty_id="+sub_f_id);
Rst.next();
int faculty_sub_num=Rst.getInt("faculty_sub_num")-1;
Stmt.executeUpdate("Update teach_faculty set faculty_sub_num="+faculty_sub_num+" where faculty_id="+sub_f_id);
Stmt.executeUpdate("delete from teach_subject where sub_id="+sub_id);
Rst=Stmt.executeQuery("select unit_id from teach_unit where unit_s_id="+sub_id);
while(Rst.next())
{
int unit_id=Rst.getInt("unit_id");
id[i]=unit_id;
i+=1;
}
Stmt.executeUpdate("delete from teach_unit where unit_s_id="+sub_id);
for(j=0;j<i;j++)
{
Stmt.executeUpdate("delete from teach_part where part_u_id="+id[j]);//
}%>
<script language="JavaScript">//如果是离开就回到首页
//top.location.href="op_faculty.jsp?out=true"
</script>这个页面是一个框架中的,最后的javascript是让这个框架转到别的页面可是如果加上转跳它就不读数据库了,要是不加转跳,就没有问题.......为什么呀?
else {}
javascript是在浏览器端执行的