⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modify.jsp

📁 基于JSP的公交查询系统,很好用的,适于学习,操作语句全在jsp页面里
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改车次信息</title>
<style type="text/css">
<!--
body {
	background-image: url(../Picture/index-top_2.gif);
	margin-left: 100px;
}
.STYLE1 {
	font-size: 16px;
	font-weight: bold;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
-->
</style></head>

<body>
 
<% 
    String busid[]=new String[100];
    int i=0;
    Connection con;
    String statement="";
	ResultSet result;
	
	
	
try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	     }
		catch(ClassNotFoundException e){}
		 
	try{  
	      con=DriverManager.getConnection("jdbc:odbc:nbos","","");
	      Statement sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); 
		  statement="select * from bus order by Sort ASC";
		  result=sql.executeQuery(statement);
		  while(result.next())
		     { busid[i]=result.getString("BusID");
			  
			   i++;
			  }  
		%>
<table width="447" border="1">
  <tr>
    <td height="20" colspan="3" background="../Picture/topbg.gif"><div align="center"><span class="STYLE1">修改车次信息</span></div></td>
  </tr>
  <tr>
    <td width="94" height="20" background="../Picture/l33.gif" class="STYLE1"><div align="center">编号</div></td>
    <td width="155" background="../Picture/l33.gif" class="STYLE1"><div align="center">要修改的车次号</div></td>
    <td width="176" background="../Picture/l33.gif" class="STYLE1"><div align="center">是否修改</div></td>
  </tr>
 <% for(int k=0;k<i;k++) { %>
  <tr>
    <td height="22" background="../Picture/l33.gif">&nbsp;<%=k+1%></td>
    <td height="22" background="../Picture/l33.gif">&nbsp;<%=busid[k]%></td>
    <td background="../Picture/l33.gif"><div align="center">
	<a href="display.jsp?busid=<%=busid[k]%>" target="_self" class="STYLE1">修改</a></div></td>
  </tr><% } %>
  <tr>
    <td height="22" colspan="3" background="../Picture/bottombg.gif">&nbsp;</td>
  </tr>
</table>
    <% result.close();
	      }  
		   catch(Exception e){}
		      %>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -