我的分类引用别人做的分类树的jsp页面,可是点击下拉框时,他那个树出不来。求高手指点,下面是我的jsp页面代码,谢谢!!!

liyun0518 2013-02-26 11:16:05
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv=X-UA-Compatible content=IE=EmulateIE7>
<title>
<s:text name="Common_Title"/>
</title>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resources/home/js/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resources/home/js/themes/icon.css">
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/home/js/jquery-1.7.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/home/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/home/js/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/scripts/CommonValidate.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/scripts/CommonAction.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/scripts/artdialog/jquery.artDialog.js?skin=chrome"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/scripts/artdialog/iframeTools.source.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resources/My97DatePicker/WdatePicker.js"></script>
<style type="text/css">
@charset "utf-8";

/********************** 全局样式 **********************/
.dis { display: block; }
.undis { display: none; }
</style>

</head>
<body>
<!-- IT设备添加 begin<div id="AddInfo" class="easyui-window" title="IT设备添加" modal=true closed=true> -->
<table id="dg" title="IT设备添加" class="easyui-datagrid" style="width:1300px;height:650px"
url="get_users.php"
toolbar="#toolbar" pagination="true"
rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="P_TypeID" width="50">分类</th>
<th field="P_BrandID" width="50">品牌</th>
<th field="P_Name" width="50">设备名称</th>
<th field="P_ManufactureCode" width="50">出厂编号</th>
<th field="P_BarCode" width="50">条形码</th>
<th field="P_UsingDate" width="50">使用时间</th>
<th field="P_Detail" width="50">详细配置</th>
<th field="P_DutyPerson" width="50">责任人</th>
<th field="P_RegisterUserID" width="50">登记人</th>
<th field="P_SearchKey" width="50">查询标志</th>
<th field="P_Note" width="50">备注</th>
</tr>
</thead>
</table>
<div id="toolbar">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newITproperty()">IT设备添加</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editITproperty()">IT设备修改</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="checkITproperty()">查看</a>
</div>
<div id="dlg" class="easyui-window" title="" modal=true closed=true style="width:350px;height:460px;padding:10px 20px"
closed="true" buttons="#dlg-buttons">
<div class="ftitle">IT设备添加</div>
<form id="fm" method="post" novalidate>
<tr>
<td>
<div style="margin:10px 0">
分类 <select class="easyui-zTree" url="faultyEqupList.action" data-options=" required:true" style="width:200px;"> </select>
</div>
</td>
</tr>
<div>
<tr>
<td valign="middle" style=" width:100px">品牌:    </td>
<td>
<select class="easyui-combobox" name="P_BrandID">
<option value="dell">戴尔</option>
<option value="hp">惠普</option>
<option value="HASEE">神州</option>
<option value="apple">苹果</option>
<option value="TOSHIBA">东芝</option>
<option value="LENOVO">联想</option>
<option value="ASUS">华硕</option>
<option value="SONY">索尼</option>
<option value="FUJITSU">富士通</option>
<option value="NEC">日电</option>
<option value="PANASONIC">松下</option>
<option value="haier">海尔</option>
<option value="QHTF">清华同方</option>
<option value="HONGJI">宏基</option>
<option value="TCL">TCL</option>
<option value="FANGZHENG">方正</option>
<option value="CHANGCHENG">长城</option>
<option value="QIXI">七喜</option>
</select>
</td>
</tr>
</div>
<div>
<tr>
<td valign="middle" >设备名称:<input id="P_Name" type="text"style=" width:150px"/></td>
</tr>
</div>
<div>
<tr>
<td valign="middle" >出厂编号:<input id="P_ManufactureCode" type="text"style=" width:150px"/></td>
</tr>
</div>
<div>
<tr>
<td valign="middle" >条形码:    <input id="P_BarCode" type="text"style=" width:150px" /></td>
</tr>
</div>
<div>
<tr>
使用时间  <td valign="middle" style=" margin:10px 0; "><input class="easyui-datebox" id="P_UsingDate" type="text"/></td>
</tr>
</div>
<div>
<tr>
<td valign="middle">详细配置 <textarea id="P_Detail" rows="3" cols="10" style=" width:160px;"></textarea></td>
</tr>
</div>
<div>
<tr>
<td valign="middle" style=" width:100px">责任人:</td>
<td>
<select class="easyui-combobox" name="责任人">
<option value="xw">小王</option>
<option value="xli">小李</option>
<option value="xz">小张</option>
<option value="xs">小宋</option>
<option value="xliu">小刘</option>
<option value="zt">小佟</option>
</select>
</td>
</tr>
</div>
<div>
<tr>
<td valign="middle" style=" width:100px">登记人:</td>
<td>
<select class="easyui-combobox" name="登记人">
<option value="xw">小王</option>
<option value="xli">小李</option>
<option value="xz">小张</option>
<option value="xs">小宋</option>
<option value="xliu">小刘</option>
<option value="zt">小佟</option>
</select>
</td>
</tr>
</div>
<div>
<tr>
<td valign="middle" style=" width:120px">查询标志:  <input id="P_SearchKey" type="text" /></td>
</tr>
</div>
<div>
<tr>
<td valign="middle" >备    注: <textarea id="P_Note" rows="3"cols="20" style=" width:160px;" ></textarea></td>
</tr>
</div>
<p></p>
<div>
<tr>
<td>
<input type="hidden" id="p_id" name="p_id" value="" />
<input type="button" value="确定" onclick="saveITproperty()" />
<input type="button" value="取消" onclick="$('#dlg').window('close')" />
</td>
</tr>
</div>
</form>
</div>

<!-- IT设备添加 end -->
<script type="text/javascript">
var url;
function newITproperty(){
$('#dlg').window('open');
$('#fm').form('clear');
//url = 'save_user.php';
}
function editITproperty(){
var row = $('#dg').datagrid('getSelected');
if (row){
$('#dlg').dialog('open').dialog('setTitle','Edit User');
$('#fm').form('load',row);
//url = 'update_user.php?id='+row.id;
}
}
function saveITproperty(){
$('#fm').form('submit',{
url: url,
onSubmit: function(){
return $(this).form('validate');
},
success: function(result){
var result = eval('('+result+')');
if (result.errorMsg){
$.messager.show({
title: 'Error',
msg: result.errorMsg
});
} else {
$('#dlg').dialog('close'); // close the dialog
$('#dg').datagrid('reload'); // reload the user data
}
}
});
}
function checkITproperty(){
var select = $('#dg').datagrid('getSelected');
if(select){
$('#dlg').window('open');
$('#fm').show();
$('#fm').appendTo('#ee');
$('#P_BrandID').val(select.P_BrandID);
$('#P_Name').val(select.P_Name);
$('#P_ManufactureCode').val(select.P_ManufactureCode);
$('#P_BarCode').val(select.P_BarCode);
$('#P_UsingDate').val(select.P_UsingDate);
$('#P_Detail').val(select.P_Detail);
$('#P_DutyPerson').val(select.P_DutyPerson);
$('#P_RegisterUserID').val(select.P_RegisterUserID);
$('#P_SearchKey').val(select.P_SearchKey);
$('#P_Note').val(select.P_Note);
id = select.id;
}else{
$.messager.alert('warning','请选择一行数据','warning');
//url = 'save_user.php';
}
}
</script>
<style type="text/css">
#fm{
margin:0;
padding:10px 30px;
}
.ftitle{
font-size:14px;
font-weight:bold;
padding:5px 0;
margin-bottom:10px;
border-bottom:1px solid #ccc;
}
.fitem{
margin-bottom:5px;
}
.fitem label{
display:inline-block;
width:80px;
}
</style>
</body>
</html>
...全文
70 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

87,991

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧