?? moditem.jsp
字號:
<%@page import="java.sql.*"%>
<%@page contentType="text/html;charset=GB2312"%>
<%@include file="opendata.jsp"%>
<%@include file="check.jsp"%>
<%!
int isempty(String str) //判斷遞交的字符串是否為空
{
if(str.length() ==0)
return (0);
else return (1);
}
%>
<%
String item = request.getParameter("item");
int itemid = Integer.parseInt(request.getParameter("itemid"));
if(item.length()==0)
{
String errmsg = "選項不可為空!!!";
out.print("<center><font color=green size=5>錯誤信息<hr></font><font color=red>"+errmsg+"</font><hr>");
out.print("<input type=button value=回上一頁 onclick=history.back()>");
}
else
{
//更新主題
sql = "update Items set Item = '"+item+"'where ItemID = "+itemid;
smt.executeUpdate(sql);
int questionid = 0;
sql = "SELECT QuestionID from Items where ItemID ="+itemid;
rs = smt.executeQuery(sql);
while(rs.next())
questionid = rs.getInt(1);
response.sendRedirect("edit.jsp?questionid="+questionid);
}
%>
<html>
<title>錯誤信息</title>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -