朋友们帮我看看,为什么点击下面的两个列表后,xiangmu()与zhaiyao()两个函数不执行?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>账务录入</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//项目和摘要选择
function xiangmu(){
var stationInteger, stationString
stationInteger=document.zw_input.xiangmu_opt.selectedIndex
stationString=document.zw_input.xiangmu_opt.options[stationInteger].text
document.zw_input.xiangmu.value =document.zw_input.xiangmu.value+stationString
}
function zhaiyao(){
var stationInteger1, stationString1
stationInteger1=document.zw_input.zhaiyao_opt.selectedIndex
stationString1=document.zw_input.zhaiyao_opt.options[stationInteger1].text
document.zw_input.zhaiyao.value =document.zw_input.zhaiyao.value+stationString1
}
</script>
</head>
<body>
<%
dim zw,mysql,mysql1,mylsh,myzzlsh,xx
zw=trim(request("zw"))
set rs1=server.CreateObject("adodb.recordset")
if zw="zw_new" then
mysql1="select * from hu_szzw where danwei='"&trim(request("danwei"))&"' and bumen='"&trim(request("bumen"))&"' and xiangmu='"&trim(request("xiangmu"))&"' and zhaiyao='"&trim(request("zhaiyao"))&"' and leibie='"&trim(request("leibie"))&"' and shouru="&CDbl(request("shouru"))&" and zhichu="&CDbl(request("zhichu"))&" and renshu="&cint(request("renshu"))
rs1.Open mysql1,conn,1,3
if rs1.eof<>true then
call MyBack("此笔账务已经存在,请不要重复录入!")
rs1.Close
set rs1=nothing
response.end
else
rs1.Close
mysql1="select max(lsh) as newlsh,max(zzlsh) as newzzlsh from hu_szzw where danwei='"&trim(request("danwei"))&"' and bumen='"&trim(request("bumen"))&"' and left(lrrq,4)='"&mid(trim(request("lrrq")),1,4)&"' and zzlsh<>'未审核'"
rs1.Open mysql1,conn,3,3
if isnull(rs1("newlsh")) or rs1("newlsh")="" then
mylsh="0001"
myzzlsh="00001"
else
mylsh=trim(Cstr(Cint(rs1("newlsh"))+1))
myzzlsh=trim(Cstr(Cint(rs1("newzzlsh"))+1))
end if
mylsh=string(4-len(mylsh),"0")&mylsh
myzzlsh=string(5-len(myzzlsh),"0")&myzzlsh
rs1.Close
set rs1=nothing
end if
my_sql="select * from hu_szzw"
set rs=server.CreateObject("adodb.recordset")
rs.Open my_sql,conn,3,3
rs.addnew
rs("danwei")=trim(request("danwei"))
rs("bumen")=trim(request("bumen"))
rs("xiangmu")=trim(request("xiangmu"))
rs("zhaiyao")=trim(request("zhaiyao"))
rs("shoufu")=trim(request("shoufu"))
rs("leibie")=trim(request("leibie"))
if trim(request("leibie"))="收入" then
rs("shouru")=CDbl(request("sz_je"))
rs("zhichu")=0
else
rs("shouru")=0
rs("zhichu")=CDbl(request("sz_je"))
end if
rs("renshu")=cint(request("renshu"))
if Trim(Request.Cookies("zw"))<=2 then
rs("ruzhang")="否"
rs("lsh")=mylsh
rs("zzlsh")=myzzlsh
rs("lrr")=Trim(Request.Cookies("xingming"))
rs("shr")=Trim(Request.Cookies("xingming"))
rs("cwdz")="未入账"
rs("zt")="待入账"
else
rs("ruzhang")="否"
rs("lsh")=mylsh
rs("zzlsh")=myzzlsh
rs("lrr")=Trim(Request.Cookies("xingming"))
rs("shr")="未审核"
rs("cwdz")="未入账"
rs("zt")="待审核"
end if
rs("c_by")=""
rs("i_by")=0
rs("m_by")=0
'rs("f_by")=0
rs("lrrq")=trim(request("lrrq"))
rs.update
zw=""
rs.Close
set rs=nothing
conn.close
response.end
else
%>
<div id="mainContent">
<div align="center">
<form action="zw_input.asp" method="Post" name="zw_input" ID="zw_input" target="_self" onSubmit="return check()"><input type="hidden" name="zw" id="zw" value="zw_new">
<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="46" bgcolor="#009966"><div align="center">收支账务录入</div></td>
</tr>
<tr>
<td height="46" bgcolor="#CCCCCC"><div align="center">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="15%"><div align="center">日期</div></td>
<td width="42%"><div align="left">
<input name="lrrq" type="text" id="lrrq" value='<%=right("0"&year(now),4)&right("0"&month(now),2)&right("0"&day(now),2)%>' size="8" maxlength="8" />
</div></td>
<td width="13%"><div align="center">类别</div></td>
<td width="30%"><div align="left">
<select name="leibie" id="leibie">
<option value="收入" selected="selected">收入</option>
<option value="支出">支出</option>
</select>
</div></td>
</tr>
<tr>
<td><div align="center">团号/项目</div></td>
<td colspan="3"><div align="left">
<input name="xiangmu" type="text" id="xiangmu" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">摘要/说明</div></td>
<td colspan="3"><div align="left">
<input name="zhaiyao" type="text" id="zhaiyao" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">金额</div></td>
<td><div align="left">
<input name="sz_je" type="text" id="sz_je" value="0" size="8" />
<select name="shoufu" id="shoufu">
<option value="应收" selected="selected">应收</option>
<option value="应付">应付</option>
</select>
</div></td>
<td><div align="center">人数</div></td>
<td><div align="left">
<input name="renshu" type="text" id="renshu" value="1" size="4" maxlength="4" />
</div></td>
</tr>
</table>
</div></td>
</tr>
<td height="59" bgcolor="#009966"><div align="center">
<input type="submit" name="ok_input" id="ok_input" value="确认" />
<input type="reset" name="re_input" id="re_input" value="重填" />
</div></td>
</tr>
</table>
<!--项目摘要选择-->
<%
set rs1=server.CreateObject("adodb.recordset")
set rs2=server.CreateObject("adodb.recordset")
x1="select * from hu_xmzy where leibie='项目' and danwei='"&Request.Cookies("danwei")&"' and bumen='"&Request.Cookies("bumen")&"' order by ID desc"
x2="select * from hu_xmzy where leibie='摘要' and danwei='"&Request.Cookies("danwei")&"' and bumen='"&Request.Cookies("bumen")&"' order by ID desc"
%>
<div align="center"><a href="zw_xmzy.asp" target="_self" class="small">项目摘要管理</a></div>
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">项目</div></td>
</tr>
<tr>
<td class="STYLE1">
<%rs1.Open x1,conn,3,3%>
<select name="xiangmu_opt" onChange="xiangmu()" multiple size="5">
<%if not rs1.eof then
for i=1 to rs1.recordcount%>
<option><%=rs1("neirong")%>
<%
rs1.movenext
if rs1.eof then
Exit for
end if
next
rs1.close
set rs1=nothing
else%>
<option>
<%
rs1.close
set rs1=nothing
end if%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear" id="clear" value="清除" onClick= 'document.zw_input.xiangmu.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">摘要</div></td>
</tr>
<tr>
<td class="STYLE1">
<%rs2.Open x2,conn,3,3%>
<select name="zhaiyao_opt" onChange="zhaiyao()" multiple size="5">
<%if not rs2.eof then
for i=1 to rs2.recordcount%>
<option><%=rs2("neirong")%>
<%
rs2.movenext
if rs2.eof then
Exit for
end if
next
rs2.close
set rs2=nothing
else%>
<option>
<%
rs2.close
set rs2=nothing
end if%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear2" id="clear2" value="清除" onClick= 'document.zw_input.zhaiyao.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<!--结束-->
</form>
<%end if%>
<%conn.close%>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>账务录入</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//项目和摘要选择
function xiangmu(){
var stationInteger, stationString
stationInteger=document.zw_input.xiangmu_opt.selectedIndex
stationString=document.zw_input.xiangmu_opt.options[stationInteger].text
document.zw_input.xiangmu.value =document.zw_input.xiangmu.value+stationString
}
function zhaiyao(){
var stationInteger1, stationString1
stationInteger1=document.zw_input.zhaiyao_opt.selectedIndex
stationString1=document.zw_input.zhaiyao_opt.options[stationInteger1].text
document.zw_input.zhaiyao.value =document.zw_input.zhaiyao.value+stationString1
}
</script>
</head>
<body>
<%
dim zw,mysql,mysql1,mylsh,myzzlsh,xx
zw=trim(request("zw"))
set rs1=server.CreateObject("adodb.recordset")
if zw="zw_new" then
mysql1="select * from hu_szzw where danwei='"&trim(request("danwei"))&"' and bumen='"&trim(request("bumen"))&"' and xiangmu='"&trim(request("xiangmu"))&"' and zhaiyao='"&trim(request("zhaiyao"))&"' and leibie='"&trim(request("leibie"))&"' and shouru="&CDbl(request("shouru"))&" and zhichu="&CDbl(request("zhichu"))&" and renshu="&cint(request("renshu"))
rs1.Open mysql1,conn,1,3
if rs1.eof<>true then
call MyBack("此笔账务已经存在,请不要重复录入!")
rs1.Close
set rs1=nothing
response.end
else
rs1.Close
mysql1="select max(lsh) as newlsh,max(zzlsh) as newzzlsh from hu_szzw where danwei='"&trim(request("danwei"))&"' and bumen='"&trim(request("bumen"))&"' and left(lrrq,4)='"&mid(trim(request("lrrq")),1,4)&"' and zzlsh<>'未审核'"
rs1.Open mysql1,conn,3,3
if isnull(rs1("newlsh")) or rs1("newlsh")="" then
mylsh="0001"
myzzlsh="00001"
else
mylsh=trim(Cstr(Cint(rs1("newlsh"))+1))
myzzlsh=trim(Cstr(Cint(rs1("newzzlsh"))+1))
end if
mylsh=string(4-len(mylsh),"0")&mylsh
myzzlsh=string(5-len(myzzlsh),"0")&myzzlsh
rs1.Close
set rs1=nothing
end if
my_sql="select * from hu_szzw"
set rs=server.CreateObject("adodb.recordset")
rs.Open my_sql,conn,3,3
rs.addnew
rs("danwei")=trim(request("danwei"))
rs("bumen")=trim(request("bumen"))
rs("xiangmu")=trim(request("xiangmu"))
rs("zhaiyao")=trim(request("zhaiyao"))
rs("shoufu")=trim(request("shoufu"))
rs("leibie")=trim(request("leibie"))
if trim(request("leibie"))="收入" then
rs("shouru")=CDbl(request("sz_je"))
rs("zhichu")=0
else
rs("shouru")=0
rs("zhichu")=CDbl(request("sz_je"))
end if
rs("renshu")=cint(request("renshu"))
if Trim(Request.Cookies("zw"))<=2 then
rs("ruzhang")="否"
rs("lsh")=mylsh
rs("zzlsh")=myzzlsh
rs("lrr")=Trim(Request.Cookies("xingming"))
rs("shr")=Trim(Request.Cookies("xingming"))
rs("cwdz")="未入账"
rs("zt")="待入账"
else
rs("ruzhang")="否"
rs("lsh")=mylsh
rs("zzlsh")=myzzlsh
rs("lrr")=Trim(Request.Cookies("xingming"))
rs("shr")="未审核"
rs("cwdz")="未入账"
rs("zt")="待审核"
end if
rs("c_by")=""
rs("i_by")=0
rs("m_by")=0
'rs("f_by")=0
rs("lrrq")=trim(request("lrrq"))
rs.update
zw=""
rs.Close
set rs=nothing
conn.close
response.end
else
%>
<div id="mainContent">
<div align="center">
<form action="zw_input.asp" method="Post" name="zw_input" ID="zw_input" target="_self" onSubmit="return check()"><input type="hidden" name="zw" id="zw" value="zw_new">
<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="46" bgcolor="#009966"><div align="center">收支账务录入</div></td>
</tr>
<tr>
<td height="46" bgcolor="#CCCCCC"><div align="center">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="15%"><div align="center">日期</div></td>
<td width="42%"><div align="left">
<input name="lrrq" type="text" id="lrrq" value='<%=right("0"&year(now),4)&right("0"&month(now),2)&right("0"&day(now),2)%>' size="8" maxlength="8" />
</div></td>
<td width="13%"><div align="center">类别</div></td>
<td width="30%"><div align="left">
<select name="leibie" id="leibie">
<option value="收入" selected="selected">收入</option>
<option value="支出">支出</option>
</select>
</div></td>
</tr>
<tr>
<td><div align="center">团号/项目</div></td>
<td colspan="3"><div align="left">
<input name="xiangmu" type="text" id="xiangmu" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">摘要/说明</div></td>
<td colspan="3"><div align="left">
<input name="zhaiyao" type="text" id="zhaiyao" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">金额</div></td>
<td><div align="left">
<input name="sz_je" type="text" id="sz_je" value="0" size="8" />
<select name="shoufu" id="shoufu">
<option value="应收" selected="selected">应收</option>
<option value="应付">应付</option>
</select>
</div></td>
<td><div align="center">人数</div></td>
<td><div align="left">
<input name="renshu" type="text" id="renshu" value="1" size="4" maxlength="4" />
</div></td>
</tr>
</table>
</div></td>
</tr>
<td height="59" bgcolor="#009966"><div align="center">
<input type="submit" name="ok_input" id="ok_input" value="确认" />
<input type="reset" name="re_input" id="re_input" value="重填" />
</div></td>
</tr>
</table>
<!--项目摘要选择-->
<%
set rs1=server.CreateObject("adodb.recordset")
set rs2=server.CreateObject("adodb.recordset")
x1="select * from hu_xmzy where leibie='项目' and danwei='"&Request.Cookies("danwei")&"' and bumen='"&Request.Cookies("bumen")&"' order by ID desc"
x2="select * from hu_xmzy where leibie='摘要' and danwei='"&Request.Cookies("danwei")&"' and bumen='"&Request.Cookies("bumen")&"' order by ID desc"
%>
<div align="center"><a href="zw_xmzy.asp" target="_self" class="small">项目摘要管理</a></div>
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">项目</div></td>
</tr>
<tr>
<td class="STYLE1">
<%rs1.Open x1,conn,3,3%>
<select name="xiangmu_opt" onChange="xiangmu()" multiple size="5">
<%if not rs1.eof then
for i=1 to rs1.recordcount%>
<option><%=rs1("neirong")%>
<%
rs1.movenext
if rs1.eof then
Exit for
end if
next
rs1.close
set rs1=nothing
else%>
<option>
<%
rs1.close
set rs1=nothing
end if%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear" id="clear" value="清除" onClick= 'document.zw_input.xiangmu.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">摘要</div></td>
</tr>
<tr>
<td class="STYLE1">
<%rs2.Open x2,conn,3,3%>
<select name="zhaiyao_opt" onChange="zhaiyao()" multiple size="5">
<%if not rs2.eof then
for i=1 to rs2.recordcount%>
<option><%=rs2("neirong")%>
<%
rs2.movenext
if rs2.eof then
Exit for
end if
next
rs2.close
set rs2=nothing
else%>
<option>
<%
rs2.close
set rs2=nothing
end if%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear2" id="clear2" value="清除" onClick= 'document.zw_input.zhaiyao.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<!--结束-->
</form>
<%end if%>
<%conn.close%>
</body>
</html>
解决方案 »
- 功能本地OK,发到服务器就不行,为什么= =
- 我在页面上放了一个图片和一个flash,flash弄成透明的,在图片上显示,为什么图片可以加载出来,而flash出不来,
- 跪求 循环得到两个日期(年-月-日)之间 的数组 ,兄弟们给支持一下就是最后的胜利了!
- 如何在ASP.NET的gridview上添加空白行,而且可以填写数据?
- 怎么防止用户在地址栏乱输入导致网页错误!具体请进
- 困了几个月,感觉超级难,在客户端按一定的公式计算DataGrid各单元格的值
- 请教DataRowCollection.item的作用。
- 控件绑定在那个时候发生??
- .net 工程拿到一台没有装.net的服务器上需要装什么才能正常显示完成的网页?
- 我有树控件,怎么没有new treenode 啊,生成不了treenode,真怪!
- 软件工程项目管理
- 要把SQL server2000数据库中的库和表 用程序的方法弄到Mysql中怎么做啊
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>账务录入</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//项目和摘要选择
function xiangmu(){
var stationInteger, stationString
stationInteger=document.zw_input.xiangmu_opt.selectedIndex
stationString=document.zw_input.xiangmu_opt.options[stationInteger].text
document.zw_input.xiangmu.value =document.zw_input.xiangmu.value+stationString
}
function zhaiyao(){
var stationInteger1, stationString1
stationInteger1=document.zw_input.zhaiyao_opt.selectedIndex
stationString1=document.zw_input.zhaiyao_opt.options[stationInteger1].text
document.zw_input.zhaiyao.value =document.zw_input.zhaiyao.value+stationString1
}
</script>
</head>
<body>
<%
dim zw,mysql,mysql1,mylsh,myzzlsh,xx
zw=trim(request("zw"))
set rs1=server.CreateObject("adodb.recordset")
if zw="zw_new" then
mysql1="select * from hu_szzw where danwei='"&trim(request("danwei"))&"' and bumen='"&trim(request("bumen"))&"' and xiangmu='"&trim(request("xiangmu"))&"' and zhaiyao='"&trim(request("zhaiyao"))&"' and leibie='"&trim(request("leibie"))&"' and shouru="&CDbl(request("shouru"))&" and zhichu="&CDbl(request("zhichu"))&" and renshu="&cint(request("renshu"))
rs1.Open mysql1,conn,1,3
if rs1.eof<>true then
call MyBack("此笔账务已经存在,请不要重复录入!")
rs1.Close
set rs1=nothing
response.end
else
rs1.Close
mysql1="select max(lsh) as newlsh,max(zzlsh) as newzzlsh from hu_szzw where danwei='"&trim(request("danwei"))&"' and bumen='"&trim(request("bumen"))&"' and left(lrrq,4)='"&mid(trim(request("lrrq")),1,4)&"' and zzlsh<>'未审核'"
rs1.Open mysql1,conn,3,3
if isnull(rs1("newlsh")) or rs1("newlsh")="" then
mylsh="0001"
myzzlsh="00001"
else
mylsh=trim(Cstr(Cint(rs1("newlsh"))+1))
myzzlsh=trim(Cstr(Cint(rs1("newzzlsh"))+1))
end if
mylsh=string(4-len(mylsh),"0")&mylsh
myzzlsh=string(5-len(myzzlsh),"0")&myzzlsh
rs1.Close
set rs1=nothing
end if
my_sql="select * from hu_szzw"
set rs=server.CreateObject("adodb.recordset")
rs.Open my_sql,conn,3,3
rs.addnew
rs("danwei")=trim(request("danwei"))
rs("bumen")=trim(request("bumen"))
rs("xiangmu")=trim(request("xiangmu"))
rs("zhaiyao")=trim(request("zhaiyao"))
rs("shoufu")=trim(request("shoufu"))
rs("leibie")=trim(request("leibie"))
if trim(request("leibie"))="收入" then
rs("shouru")=CDbl(request("sz_je"))
rs("zhichu")=0
else
rs("shouru")=0
rs("zhichu")=CDbl(request("sz_je"))
end if
rs("renshu")=cint(request("renshu"))
if Trim(Request.Cookies("zw"))<=2 then
rs("ruzhang")="否"
rs("lsh")=mylsh
rs("zzlsh")=myzzlsh
rs("lrr")=Trim(Request.Cookies("xingming"))
rs("shr")=Trim(Request.Cookies("xingming"))
rs("cwdz")="未入账"
rs("zt")="待入账"
else
rs("ruzhang")="否"
rs("lsh")=mylsh
rs("zzlsh")=myzzlsh
rs("lrr")=Trim(Request.Cookies("xingming"))
rs("shr")="未审核"
rs("cwdz")="未入账"
rs("zt")="待审核"
end if
rs("c_by")=""
rs("i_by")=0
rs("m_by")=0
'rs("f_by")=0
rs("lrrq")=trim(request("lrrq"))
rs.update
zw=""
rs.Close
set rs=nothing
conn.close
response.end
else
%>
<div id="mainContent">
<div align="center">
<form action="zw_input.asp" method="Post" name="zw_input" ID="zw_input" target="_self" onSubmit="return check()"><input type="hidden" name="zw" id="zw" value="zw_new">
<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="46" bgcolor="#009966"><div align="center">收支账务录入</div></td>
</tr>
<tr>
<td height="46" bgcolor="#CCCCCC"><div align="center">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="15%"><div align="center">日期</div></td>
<td width="42%"><div align="left">
<input name="lrrq" type="text" id="lrrq" value='<%=right("0"&year(now),4)&right("0"&month(now),2)&right("0"&day(now),2)%>' size="8" maxlength="8" />
</div></td>
<td width="13%"><div align="center">类别</div></td>
<td width="30%"><div align="left">
<select name="leibie" id="leibie">
<option value="收入" selected="selected">收入</option>
<option value="支出">支出</option>
</select>
</div></td>
</tr>
<tr>
<td><div align="center">团号/项目</div></td>
<td colspan="3"><div align="left">
<input name="xiangmu" type="text" id="xiangmu" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">摘要/说明</div></td>
<td colspan="3"><div align="left">
<input name="zhaiyao" type="text" id="zhaiyao" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">金额</div></td>
<td><div align="left">
<input name="sz_je" type="text" id="sz_je" value="0" size="8" />
<select name="shoufu" id="shoufu">
<option value="应收" selected="selected">应收</option>
<option value="应付">应付</option>
</select>
</div></td>
<td><div align="center">人数</div></td>
<td><div align="left">
<input name="renshu" type="text" id="renshu" value="1" size="4" maxlength="4" />
</div></td>
</tr>
</table>
</div></td>
</tr>
<td height="59" bgcolor="#009966"><div align="center">
<input type="submit" name="ok_input" id="ok_input" value="确认" />
<input type="reset" name="re_input" id="re_input" value="重填" />
</div></td>
</tr>
</table>
<!--项目摘要选择-->
<%
set rs1=server.CreateObject("adodb.recordset")
set rs2=server.CreateObject("adodb.recordset")
x1="select * from hu_xmzy where leibie='项目' and danwei='"&Request.Cookies("danwei")&"' and bumen='"&Request.Cookies("bumen")&"' order by ID desc"
x2="select * from hu_xmzy where leibie='摘要' and danwei='"&Request.Cookies("danwei")&"' and bumen='"&Request.Cookies("bumen")&"' order by ID desc"
%>
<div align="center"><a href="zw_xmzy.asp" target="_self" class="small">项目摘要管理</a></div>
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">项目</div></td>
</tr>
<tr>
<td class="STYLE1">
<%rs1.Open x1,conn,3,3%>
<select name="xiangmu_opt" onChange="xiangmu()" multiple size="5">
<%if not rs1.eof then
for i=1 to rs1.recordcount%>
<option><%=rs1("neirong")%>
<%
rs1.movenext
if rs1.eof then
Exit for
end if
next
rs1.close
set rs1=nothing
else%>
<option>
<%
rs1.close
set rs1=nothing
end if%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear" id="clear" value="清除" onClick= 'document.zw_input.xiangmu.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">摘要</div></td>
</tr>
<tr>
<td class="STYLE1">
<%rs2.Open x2,conn,3,3%>
<select name="zhaiyao_opt" onChange="zhaiyao()" multiple size="5">
<%if not rs2.eof then
for i=1 to rs2.recordcount%>
<option><%=rs2("neirong")%>
<%
rs2.movenext
if rs2.eof then
Exit for
end if
next
rs2.close
set rs2=nothing
else%>
<option>
<%
rs2.close
set rs2=nothing
end if%>
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear2" id="clear2" value="清除" onClick= 'document.zw_input.zhaiyao.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<!--结束-->
</form>
<%end if%>
<%conn.close%>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>账务录入</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function check(){
if(zw_input.lrrq.value.length == 0)
{
alert("请填写录入日期!");
zw_input.lrrq.focus();
return false;
}
if(zw_input.xiangmu.value.length == 0)
{
alert("请填写团号或项目!");
zw_input.xiangmu.focus();
return false;
}
if(zw_input.zhaiyao.value.length == 0)
{
alert("请填写摘要!");
zw_input.zhaiyao.focus();
return false;
}
if(zw_input.sz_je.value.length == 0)
{
alert("请填写钱数!");
zw_input.sz_je.focus();
return false;
} }
//项目和摘要选择
function xiangmu(){
document.zw_input.xiangmu.value ="OK"
//var stationInteger, stationString
//stationInteger=document.zw_input.xiangmu_opt.selectedIndex
//stationString=document.zw_input.xiangmu_opt.options[stationInteger].text
//document.zw_input.xiangmu.value =document.zw_input.xiangmu.value+stationString
}
function zhaiyao(){
var stationInteger1, stationString1
stationInteger1=document.zw_input.zhaiyao_opt.selectedIndex
stationString1=document.zw_input.zhaiyao_opt.options[stationInteger1].text
document.zw_input.zhaiyao.value =document.zw_input.zhaiyao.value+stationString1
}
</script>
</head>
<body> <div id="mainContent">
<div align="center">
<form action="zw_input.asp" method="Post" name="zw_input" ID="zw_input" target="_self" onSubmit="return check()"><input type="hidden" name="zw" id="zw" value="zw_new">
<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="46" bgcolor="#009966"><div align="center">收支账务录入</div></td>
</tr>
<tr>
<td height="46" bgcolor="#CCCCCC"><div align="center">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="15%"><div align="center">日期</div></td>
<td width="42%"><div align="left">
<input name="lrrq" type="text" id="lrrq" value='20110610' size="8" maxlength="8" />
</div></td>
<td width="13%"><div align="center">类别</div></td>
<td width="30%"><div align="left">
<select name="leibie" id="leibie">
<option value="收入" selected="selected">收入</option>
<option value="支出">支出</option>
</select>
</div></td>
</tr>
<tr>
<td><div align="center">团号/项目</div></td>
<td colspan="3"><div align="left">
<input name="xiangmu" type="text" id="xiangmu" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">摘要/说明</div></td>
<td colspan="3"><div align="left">
<input name="zhaiyao" type="text" id="zhaiyao" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">金额</div></td>
<td><div align="left">
<input name="sz_je" type="text" id="sz_je" value="0" size="8" />
<select name="shoufu" id="shoufu">
<option value="应收" selected="selected">应收</option>
<option value="应付">应付</option>
</select>
</div></td>
<td><div align="center">人数</div></td>
<td><div align="left">
<input name="renshu" type="text" id="renshu" value="1" size="4" maxlength="4" />
</div></td>
</tr>
</table>
</div></td>
</tr>
<td height="59" bgcolor="#009966"><div align="center">
<input type="submit" name="ok_input" id="ok_input" value="确认" />
<input type="reset" name="re_input" id="re_input" value="重填" />
</div></td>
</tr>
</table>
<!--项目摘要选择-->
<div align="center"><a href="zw_xmzy.asp" target="_self" class="small">项目摘要管理</a></div>
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">项目</div></td>
</tr>
<tr>
<td class="STYLE1">
<select name="xiangmu_opt" onChange="xiangmu()" multiple size="5">
<option>127团
<option>281团
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear" id="clear" value="清除" onClick= 'document.zw_input.xiangmu.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">摘要</div></td>
</tr>
<tr>
<td class="STYLE1">
<select name="zhaiyao_opt" onChange="zhaiyao()" multiple size="5">
<option>通讯费
<option>交通费
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear2" id="clear2" value="清除" onClick= 'document.zw_input.zhaiyao.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<!--结束-->
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>账务录入</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//项目和摘要选择
function xiangmu(){
var stationInteger, stationString
stationInteger=document.zw_input.xiangmu_opt.selectedIndex
stationString=document.zw_input.xiangmu_opt.options[stationInteger].text
document.zw_input.xiangmu.value =document.zw_input.xiangmu.value+stationString
}
function zhaiyao(){
var stationInteger1, stationString1
stationInteger1=document.zw_input.zhaiyao_opt.selectedIndex
stationString1=document.zw_input.zhaiyao_opt.options[stationInteger1].text
document.zw_input.zhaiyao.value =document.zw_input.zhaiyao.value+stationString1
}
</script>
</head>
<body>
<div id="mainContent">
<div align="center">
<form action="zw_input.asp" method="Post" name="zw_input" ID="zw_input" target="_self">
<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td height="46" bgcolor="#009966"><div align="center">收支账务录入</div></td>
</tr>
<tr>
<td height="46" bgcolor="#CCCCCC"><div align="center">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="15%"><div align="center">项目</div></td>
<td><div align="left">
<input name="xiangmu" type="text" id="xiangmu" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">摘要</div></td>
<td><div align="left">
<input name="zhaiyao" type="text" id="zhaiyao" size="40" maxlength="500" />
</div></td>
</tr>
<tr>
<td><div align="center">金额</div></td>
<td><div align="left">
<input name="sz_je" type="text" id="sz_je" value="0" size="8" />
</div> <div align="center"></div></td>
</tr>
</table>
</div></td>
</tr>
<td height="31" bgcolor="#009966"><div align="center">
<input type="submit" name="ok_input" id="ok_input" value="确认"
/> <input type="reset" name="re_input" id="re_input" value="重填" />
</div></td>
</tr>
</table>
<!--项目摘要选择-->
<div align="center"><a href="zw_xmzy.asp" target="_self" class="small">项目摘要管理
</a></div>
<table width="400" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">项目</div></td>
</tr>
<tr>
<td class="STYLE1">
<select name="xiangmu_opt" onChange="xiangmu()" multiple size="5">
<option>127团
<option>281团
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear" id="clear" value="清除" onClick= 'document.zw_input.xiangmu.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
<td><div align="center">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">摘要</div></td>
</tr>
<tr>
<td class="STYLE1">
<select name="zhaiyao_opt" onChange="zhaiyao()" multiple size="5">
<option>通讯费
<option>交通费
</select>
</td>
</tr>
<tr>
<td bgcolor="#009966" class="STYLE1"><div align="center">
<label>
<input type="BUTTON" name="clear2" id="clear2" value="清除" onClick= 'document.zw_input.zhaiyao.value =""'/>
</label>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<!--结束-->
</form>
</body>
</html>
xiangmu()与其中一个控件名称一个,当然有可能会出错了