<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<base target="_self">
<link rel="STYLESHEET" type="text/css" href="dhtmlXTree.css">
<script src="dhtmlXCommon.js"></script>
<script src="dhtmlXTree.js"></script>
<script src="bole_window.js"></script>
<style type="text/css">
#box{width:800px;height:400px;padding:0px;
border: solid 2px #CECECE;position:absolute;left:50%;top:50%;
margin-left:-400px;margin-top:-200px; }
#master{width:100%;height:300px;padding:5px;
left:0px;top:0px;border: solid 0px ;position:absolute;}
#tree{}
#cell{}
td.menu, td.menu a{
font-family:arial;
font-size:12px;
margin-left:10px;
text-decoration:none;
color:white;
}
#Layer1 {
position:absolute;
left:288px;
top:113px;
width:85px;
height:25px;
z-index:1;
}
#Layer2 {
position:absolute;
left:320px;
top:110px;
width:44px;
height:22px;
z-index:1;
}
</style>
<script language="javascript">
function load(){
document.getElementById("delRow").disabled = true;
document.getElementById("updRow").disabled = true;
// document.all("cell").insertRow("2008001"+","+"郑州博乐"+","+"小王"+","+"15890164344"+","+"河南驻马店");
// document.all("cell").insertRow("2008002"+","+"郑州博乐"+","+"小张"+","+"15890164344"+","+"河南开封");
// document.all("cell").insertRow("2008003"+","+"郑州博乐"+","+"小王"+","+"15890164344"+","+"河南驻马店");
// document.all("cell").insertRow("2008004"+","+"郑州博乐"+","+"小张"+","+"15890164344"+","+"河南开封");
// document.all("cell").insertRow("2008005"+","+"郑州博乐"+","+"小王"+","+"15890164344"+","+"河南驻马店");
// document.all("cell").insertRow("2008006"+","+"郑州博乐"+","+"小张"+","+"15890164344"+","+"河南开封");
}
function btnAdd(){
//var message=document.all("cell").getMessage();
//alert(message);
toOnload();
document.getElementById("delRow").disabled = true;
document.getElementById("updRow").disabled = false;
document.getElementById("find").disabled = true;
}
function btnDel(){
//alert("删除一行");
document.all("cell").removeRow(1);
}
//当前单元格变为可编辑
function btnUpd(){
document.all.hidd.value="1";
document.getElementById("delRow").disabled = false;
}
//查找
function btnFind(){
document.all("cell").insertRow("2008008"+","+"洛阳旅游公司"+","+"白云山"+","+"15866668888"+","+"洛阳市嵩山县");
document.getElementById("delRow").disabled = true;
document.getElementById("updRow").disabled = false;
document.getElementById("addRow").disabled = true;
document.getElementById("find").disabled = true;
}
function rowClick(){
var row=document.all("cell").getCurRow();
if (row<1) return;
parent.rowClick(row);
}
function rowDblClick(){
var row=document.all("cell").getCurRow();
if (row<1) return;
parent.rowDblClick(row);
//onDblClick="rowDblClick()"
}
function toOnload(){
//for(var i=1;i<7;i++){
document.all("cell").insertRow(""+","+""+","+""+","+""+","+"");
//}
}
</script>
</head>
<!--<body onLoad="toOnload();">-->
<body onLoad="load();">
<!--<div id="box">-->
<!--表格控件-->
<div id="cell" style="FONT-SIZE:12px;LEFT:150px;BEHAVIOR:url(./cell.htc);
FONT-FAMILY:宋体;POSITION:absolute;TOP:50px;width:100%"
colLength="6" headText=",好友帐号,单位名称,联系人,电话,地址" colWidth="30,90,150,90,90,170" onRowClick="rowClick()">
<input type="button" id="addRow" onClick="btnAdd()" name="Submit" value="新增">
<input type="button" id="delRow" onClick="btnDel()" name="Submit" value="删除">
<input type="button" id="updRow" onClick="btnUpd()" name="Submit" value="修改">
<input id="findInfo" type="text" value="白云山" size=10 disabled=disabled>
<input type="button" id="find" onClick="btnFind()" value="查找">
<input id="hidd" type="hidden" value="0">
</div>
<!--</div>-->
</body>
</html>