其实他数据已在页面上有了,只是隐藏起来了,你点图标是加号图标就变成了减号图标,
<%@ language=VBScript %>
<html><head>
<title>开元办公自动化软件</title>
<style>
input
{
background-color:#d7f4d5;color:#000090;
}
A {
COLOR: black; FONT-SIZE: 9pt; FONT-STYLE: normal; TEXT-DECORATION: none
}
A:hover {
COLOR: red; FONT-SIZE: 9pt; FONT-STYLE: normal; TEXT-DECORATION: none
}
A:active {
COLOR: #00ccff; FONT-SIZE: 9pt; FONT-STYLE: normal; TEXT-DECORATION: underline
}
</style><Script Language =JavaScript>
function clickmenu()
{
var eventid,hidid;
eventid=window.event.srcElement.id;
hidid=eventid+'_div';
if (window.event.srcElement.tagName=='img')
{
if (document.all(hidid).style.display=='inline')
{
document.all(eventid).src='img/item.GIF';
document.all(hidid).style.display='none';
}
else
{
document.all(eventid).src='img/plus.GIF';
document.all(hidid).style.display='inline';
}
}
}
function add_node()
{
window.open ('1.asp',null,'width=600,height=400,toolbar=yes,resizable=yes,scrollbars=yes,status=no' );
}
</Script></head><body id=bodyid noWrap background="Images/BJ_TITLE.GIF"><%on error resume next
set conn=server.CreateObject("adodb.connection")
conn.Open("Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=oa_tm;Data Source='127.0.0.1';pwd=sa;") function MakeTreeRoot()
sql="select * from AS_CLASSIFY where AS_level=1"
set rs1=conn.Execute(sql)
while not rs1.EOF
response.Write " "&rs1("nod_name")&"<br>"
addson(rs1("nod_code"))
rs1.MoveNext
wend
end function
function addson(fathernode)
node=fathernode
sql="select * from AS_CLASSIFY where last_node='"&node&"' and as_level<>1"
set rs2=conn.Execute(sql)
while not rs2.eof
response.Write "bbbbbbbbbbbx"&rs2("nod_name")&"<br>"
addson(rs2("nod_code"))
rs2.movenext
wend
rs2.close
end function
maketreeroot()
response.End
if request("node_name")<>"" then
insertsql="insert into as_classify(nod_name,last_node) values('"
insertsql=insertsql&request("node_name")&"','"&request("node_code")&"')"
conn.Execute insertsql
if err.number<>0 then
response.Write insertsql
response.Write err.Description
response.End
end if
end if
dim rcSet,rcSetCopy,strSql
dim row,wname,tmc,yjbh,wname1,tmc1,yjbh1
dim vbCR
vbCR=chr(13)&chr(10)
Set rs1=server.CreateObject("ADODB.RecordSet")
strSql="select * from as_classify where (last_node='' or last_node is null)"
'response.Write strsql
rs1.Open strSql,conn,1,3
rs1.MoveFirst
while not rs1.EOF
yjbh=rs1("nod_code")
Response.Write "<DIV id=" & yjbh & " tagName=fatherNode style='position:relative;top:0;Cursor:help;font-size:10pt ' onclick='clickmenu()'><img id=" & yjbh & "_img tagName=img src='img/plus.gif'><font size=2 color=red>" & rs1("nod_name") & "</font></DIV>"
Response.Write "<DIV id=" & yjbh & "_img_div tagName=box style='position:relative;top:0;display:inline;font-size:10pt ' > "
'response.Write "<img src='zhou/PLUS.GIF' onclick='clickmenu()' tagName=img"&rs1("nod_code")&"></img><font size=2 color=red>"&rs1("nod_name")&"</font><br>"
'response.Write "<div id='"&rs1("nod_code")&"_div' tagName=box onclick='clickmenu()' style='position:relative;top:0;display:none;font-size:10pt '"&" <br> "
set rs2=conn.Execute("select * from as_classify where last_node='"&rs1("nod_code")&"'")
while not rs2.EOF
response.Write " <font size=2 color=blue>"&rs2("nod_name")&"</font><br>"
rs2.movenext
wend
rs2.Close
set rs2=nothing
response.Write "</div>"
rs1.MoveNext
wend
set rs3=conn.Execute(strsql)
%>
<form name=frm1 action=dir.asp>
<table border=1 cellspacing=0 cellpadding=0 bgcolor="#ccffff">
<tr>
<td >所属节点名称</td>
<td>
<select name=node_code>
<option></option>
<%
while not rs3.eof
%>
<option value='<%=rs3("nod_code")%>'><%=rs3("nod_name")%></option>
<%
rs3.movenext
wend
%>
</select>
</td>
<td>节点名称</td>
<td><input type=text name=node_name ></td>
</tr>
</table>
<input type=button name=b1 value="提交" onclick=frm1.submit() >
</form>
</body>
</html>
你照着做吧
<%@ language=VBScript %>
<html><head>
<title>开元办公自动化软件</title>
<style>
input
{
background-color:#d7f4d5;color:#000090;
}
A {
COLOR: black; FONT-SIZE: 9pt; FONT-STYLE: normal; TEXT-DECORATION: none
}
A:hover {
COLOR: red; FONT-SIZE: 9pt; FONT-STYLE: normal; TEXT-DECORATION: none
}
A:active {
COLOR: #00ccff; FONT-SIZE: 9pt; FONT-STYLE: normal; TEXT-DECORATION: underline
}
</style><Script Language =JavaScript>
function clickmenu()
{
var eventid,hidid;
eventid=window.event.srcElement.id;
hidid=eventid+'_div';
if (window.event.srcElement.tagName=='img')
{
if (document.all(hidid).style.display=='inline')
{
document.all(eventid).src='img/item.GIF';
document.all(hidid).style.display='none';
}
else
{
document.all(eventid).src='img/plus.GIF';
document.all(hidid).style.display='inline';
}
}
}
function add_node()
{
window.open ('1.asp',null,'width=600,height=400,toolbar=yes,resizable=yes,scrollbars=yes,status=no' );
}
</Script></head><body id=bodyid noWrap background="Images/BJ_TITLE.GIF"><%on error resume next
set conn=server.CreateObject("adodb.connection")
conn.Open("Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=oa_tm;Data Source='127.0.0.1';pwd=sa;") function MakeTreeRoot()
sql="select * from AS_CLASSIFY where AS_level=1"
set rs1=conn.Execute(sql)
while not rs1.EOF
response.Write " "&rs1("nod_name")&"<br>"
addson(rs1("nod_code"))
rs1.MoveNext
wend
end function
function addson(fathernode)
node=fathernode
sql="select * from AS_CLASSIFY where last_node='"&node&"' and as_level<>1"
set rs2=conn.Execute(sql)
while not rs2.eof
response.Write "bbbbbbbbbbbx"&rs2("nod_name")&"<br>"
addson(rs2("nod_code"))
rs2.movenext
wend
rs2.close
end function
maketreeroot()
response.End
if request("node_name")<>"" then
insertsql="insert into as_classify(nod_name,last_node) values('"
insertsql=insertsql&request("node_name")&"','"&request("node_code")&"')"
conn.Execute insertsql
if err.number<>0 then
response.Write insertsql
response.Write err.Description
response.End
end if
end if
dim rcSet,rcSetCopy,strSql
dim row,wname,tmc,yjbh,wname1,tmc1,yjbh1
dim vbCR
vbCR=chr(13)&chr(10)
Set rs1=server.CreateObject("ADODB.RecordSet")
strSql="select * from as_classify where (last_node='' or last_node is null)"
'response.Write strsql
rs1.Open strSql,conn,1,3
rs1.MoveFirst
while not rs1.EOF
yjbh=rs1("nod_code")
Response.Write "<DIV id=" & yjbh & " tagName=fatherNode style='position:relative;top:0;Cursor:help;font-size:10pt ' onclick='clickmenu()'><img id=" & yjbh & "_img tagName=img src='img/plus.gif'><font size=2 color=red>" & rs1("nod_name") & "</font></DIV>"
Response.Write "<DIV id=" & yjbh & "_img_div tagName=box style='position:relative;top:0;display:inline;font-size:10pt ' > "
'response.Write "<img src='zhou/PLUS.GIF' onclick='clickmenu()' tagName=img"&rs1("nod_code")&"></img><font size=2 color=red>"&rs1("nod_name")&"</font><br>"
'response.Write "<div id='"&rs1("nod_code")&"_div' tagName=box onclick='clickmenu()' style='position:relative;top:0;display:none;font-size:10pt '"&" <br> "
set rs2=conn.Execute("select * from as_classify where last_node='"&rs1("nod_code")&"'")
while not rs2.EOF
response.Write " <font size=2 color=blue>"&rs2("nod_name")&"</font><br>"
rs2.movenext
wend
rs2.Close
set rs2=nothing
response.Write "</div>"
rs1.MoveNext
wend
set rs3=conn.Execute(strsql)
%>
<form name=frm1 action=dir.asp>
<table border=1 cellspacing=0 cellpadding=0 bgcolor="#ccffff">
<tr>
<td >所属节点名称</td>
<td>
<select name=node_code>
<option></option>
<%
while not rs3.eof
%>
<option value='<%=rs3("nod_code")%>'><%=rs3("nod_name")%></option>
<%
rs3.movenext
wend
%>
</select>
</td>
<td>节点名称</td>
<td><input type=text name=node_name ></td>
</tr>
</table>
<input type=button name=b1 value="提交" onclick=frm1.submit() >
</form>
</body>
</html>
你照着做吧
解决方案 »
- Extjs FormPanel 里的labelAlign怎么不能定义??
- 在谷歌浏览器中,如何用JS复制内容到剪贴板上???
- 为什么用eval解析json字符串要加括号,否则就报语法错误?
- 网页文件下载的js代码
- 高手进来看下,用innerrHTML替换内容后媒体播放器会失效。
- 关于下载js文件的问题??
- 怎么样使用一个提交框触发两个或者多个函数?
- 200分求教,把这段代码转换为vbs或jsp都可以?谢谢!在线等待
- 怎么设定<select>的当前值!
- 我在js文件里面怎么引用另外一个js文件???
- 请问如何判断输入框中输入的是半角字符还是全角字符
- 如何仅通过{client|server}{javascript|vbscript}实现‘执行服务器端可执行文件’功能,如某一批处理文件。(服务器可自由设置)
document.all(hidid).style.display=='none'inline为显示,none为隐藏hidid是<div id=hidid>的id,另外还需两小图标(+和-)
如何显示数据,那就看你数据库如何设计的了(自己写),
自己想想吧,不行再问我