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

📄 node_create.jsp

📁 用JAVA实现的对动态树状信息的管理。操作员可以通过IE浏览器查看整个树形结构信息
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="com.socialite.bizlogic.util.CookieTool,
                 com.socialite.bizlogic.util.Char,
                 com.socialite.bizlogic.client.BizLogicClient,
                 com.socialite.bizlogic.util.XMLObject,
				 com.socialite.bizlogic.tree.TreeNodeObject,
				 com.socialite.bizlogic.tree.TreeObject,
				 com.socialite.bizlogic.tree.TreeIterator,
				 javax.swing.tree.DefaultTreeModel,
				 javax.swing.tree.DefaultMutableTreeNode"%>
				 
<%
	// 如果操作员没有登录,则转到登录页面
    String op_id = com.socialite.bizlogic.util.CookieTool.getCookieValue(request.getCookies(),"op_id");
    if(op_id==null)
    {
        response.sendRedirect("/login/logout.jsp");
        return;
    }  else if (op_id.equalsIgnoreCase("-1") ){
        response.sendRedirect("/login/logout.jsp");
        return;
    }
	request.setCharacterEncoding("gb2312");//处理中文显示问题

	String id_error = request.getParameter("id_error");
    String error_message =null;

    //判断从后面返回的错误信息
    if(id_error==null) {
        id_error="";
    } else if (id_error.equalsIgnoreCase("1") ) {
        error_message = "参数错误";
		response.sendRedirect("tree_show.jsp");
        return;
    } else if (id_error.equalsIgnoreCase("2") ) {
        error_message = "节点名称不能为空";
    } else if (id_error.equalsIgnoreCase("3") ) {
        error_message = "节点名称已经被占用,请重新选择";;
    } else {
        error_message = "内部系统错误!";
    }
    
	String father_id=request.getParameter("node_id");
	
	

%>
<html>
<head>
<title>树型结构管理——增加新节点</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">

<script language="javascript">
function goAction()
{
	
	
	if(create_node_frm.name.value == ""){
		alert("节点名称不能为空!");
		return false;
	}
	
	return true;
}
	
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td rowspan="3" width="30"></td>
    <td></td>
    <td rowspan="3" width="30"></td>
  </tr>
  <tr>
    <td>
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="6"></td>
        </tr>
        <tr>
          <td colspan="6" class="title" height="30"><br> 
            <b>增加子节点<br>
            <br>
            <%
			   if (error_message != null) {
			      out.println("错误消息:");
				  out.println(error_message);
				  }
			%></b></td>
        </tr>
        <tr>
          <td colspan="6" class="content" height="12">请输入新节点信息 </td>
        </tr>
        <tr>
          <td colspan="6" background="images/bg_table1.gif" height="6"></td>
        </tr>
        <form name="create_node_frm" method=post action="node_create_do.jsp">
          <tr bgcolor="ACE3EB">
            <td height="24" width="16"> </td>
            <td height="24" colspan="5" bgcolor="ACE3EB" class="table_title">节点信息(编号由服务器自动生成) </td>
          </tr>
          <tr bgcolor="5DC6D5">
            <td colspan="6" height="1"></td>
          </tr>
          <tr>
            <td height="24" width="16"> </td>
            <td class="content" height="24" width="124">父亲节点编号</td>
            <td class="content" height="24" colspan="2">&nbsp;<%=father_id%><input name="father_id" type="hidden" class="content"  value="<%=father_id%>" id="father_id"></td>
            <td height="24" colspan="2" class="content">&nbsp;</td>
          </tr>
          <tr bgcolor="5DC6D5">
            <td colspan="6" height="1"></td>
          </tr>
          <tr>
            <td height="24">&nbsp;</td>
            <td class="content" height="24">节点名称</td>
            <td class="content" height="24" colspan="2"><input name="name" type="text" class="content" id="name"></td>
            <td height="24" colspan="2" class="content">&nbsp;</td>
            
          </tr>
          <tr bgcolor="5DC6D5">
            <td colspan="6" height="1"></td>
          </tr>
          <tr>
            <td height="24">&nbsp;</td>
            <td class="content" height="24">连接URL</td>
            <td class="content" height="24" colspan="2"><input name="url" type="text" class="content" id="url"></td>
            <td width="135" height="24" class="content"></td>
            <td width="138" height="24"></td>
          </tr>
          <tr bgcolor="5DC6D5">
            <td colspan="6" height="1"></td>
          </tr>
          
          <tr>
            <td colspan="6" height="20"></td>
          </tr>
          <tr>
            <td colspan="6" height="20" align="center"> <input type="submit" name="submit" value="提交" onClick="return goAction();" >
              &nbsp;&nbsp; <input type="reset" name="reset" value="重填"> </td>
          </tr>
        </form>
      </table>
	</td></tr> <tr> <td> </td></tr> </table>
</body>
</html>

⌨️ 快捷键说明

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