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

📄 filemanage.jsp

📁 wml和jsp实现wap网站后台管理及手机显示的过程
💻 JSP
字号:
<%@ page import="java.sql.*,java.util.Vector"%><%@ taglib uri="http://herald.seu.edu.cn/yiwen" prefix="cyndi"%><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>艺文频道管理系统</title><style type="text/css">a:{color:gray}a:link{color:gray}a:visited{text-decoration:none;color:gray}A:hover {text-decoration:none;color:red}</style><script>function check(){  if(document.all.item("bigclass").value=="-1")return false;  document.all.item("bigname").value=document.all.item("bigclass").value;  if(document.all.item("smallclass")!=null)document.all.item("smallname").value=document.all.item("smallclass").value;  return true;}</script></head><body><jsp:useBean id="item" scope="page" class="beanclass.FileManageBean"/><jsp:setProperty name="item" property="*"/><cyndi:topandbottom title="<%=item.getId()%>"><form METHOD=POST ACTION="fileManage.jsp?id=<%=item.getId()%>&num=<%=item.getNum()%>"><input type=submit name=hehe style="display:none">添加到&nbsp;&nbsp;<select name="bigclass" onchange="document.all.item('hehe').click();"><option value="-1" selected>选择栏目</option><%Class.forName("org.gjt.mm.mysql.Driver").newInstance();    String url ="jdbc:mysql://localhost/javagame?user=nangua&password=2003herald&useUnicode=true&characterEncoding=8859_1";    Connection con= DriverManager.getConnection(url);    Statement statement=con.createStatement();    ResultSet rs=statement.executeQuery("select id,classname from bigclass");    while(rs.next()){%><option value=<%=rs.getString("id")%> <%if(rs.getString("id").equals(item.getBigclass())){%>selected<%}%>><%=rs.getString("classname")%></option><%}rs.close();%></select>&nbsp;&nbsp;<%    rs=statement.executeQuery("select id,classname from smallclass where parentid="+item.getBigclass());    int i=0;    while(rs.next()){%><%if(i==0){%>子栏目&nbsp;&nbsp;<select name="smallclass"><%i=1;}%><option value=<%=rs.getString("id")%>><%=rs.getString("classname")%></option><%}rs.close();statement.close();con.close();%></select></form><%String tt="";if(item.getNum().equals("0"))tt="addFile.jsp";else tt="listFile.jsp";%><form method=post action=<%=tt%> onsubmit="return check();"><input type=text name=bigname style="display:none"><input type=text name=smallname style="display:none"><input type=submit value="下一步"></form></cyndi:topandbottom></body></html>

⌨️ 快捷键说明

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