这个功能怎么实现?????

wcy97ck 2002-12-04 08:31:30

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>地区</title>
<base target="_self">
</head>
<body bgcolor="#F7FFF7" >
<%

xx=request.form("xx")
response.cookies("xx")=xx
yy=len(xx) '取得xx的长度
if yy=4 then
hh=1
elseif yy=5 then
hh=2
end if

hh1=left(xx,hh) '取得月份
sy=hh1-1
if sy=0 then
sy=12
end if
xy=hh1+1
if xy=13 then
xy=0
end if
hh2=right(xx,2) '取得旬
if hh2="上旬" then
hh3=1 '取得日
elseif hh2="中旬" then
hh3=11
elseif hh2="下旬" then
hh3=21
end if
hh4=year(date()) '取得年
qn=hh4-1

date00=dateserial(hh4,hh1,hh3)
response.write date00

Set ycc = Server.CreateObject("ADODB.Connection")
ycc.open "ptdata","user","user"
user0="SELECT fabm as fabm FROM ptyfqdfa where riqi='"&date00&"' order by fabm "
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.Open user0,ycc,3,1
if not rs1.eof then
rs1.movefirst
i=0
do while not rs1.eof
rs1.movenext
i=i+1
loop
end if
rs1.close
response.write i

function getname(code)
dim sql
subsql=" select lc1 as lc from ptyfqdfa where ptyfqdfa.fabm= '"&code&"' "
set subrs=conn.execute(subsql)
if subrs.eof then
getname="0"
else
getname=subrs.fields("lc1").value
end if
subrs.close
end function
%>
<SCRIPT language=JavaScript>"
1="messages[11]='"
k1=k1 & getname("421536") & "';"
response.write k1
k1=k1 & getname("495108") & "';"
response.write k1
response.write"</SCRIPT>"'
</SCRIPT>



<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="100%"><b><font face="幼圆" color="#000080">生成<span lang="zh-cn">排产</span>:<font size="2" color="red"><%response.write xx%></font></font></b></td>
</tr>
<tr>
<td width="100%">
<p align="right"><b><font color="#FF0000" size="2"><span lang="zh-cn">单位:吨</span></font></b></td>
</tr>
</table>
<hr color="#008000">
<b><form method="POST" action="scpc3.asp">
<script language="JavaScript">
<!-- Begin
function messageReveal() {
var messageindex = document.messageForm.D1.selectedIndex
document.messageForm.T1.value = messageindex;
}
// End -->
</script>
<input type="hidden" name="qq2" size="6" value="<%=scode%>"><input type="hidden" name="qq2" size="6" value="<%=scode%>">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="31">
<tr>
<td width="33%" height="16"><span lang="zh-cn">选择方案</span></td>
<td width="33%" height="16"><span lang="zh-cn">方案小麦需求</span></td>
<td width="34%" height="16"><span lang="zh-cn">排产顺序</span></td>
</tr>
<%

for j= 1 to i
%>
<tr>
<td width="33%" height="14"><select size="1" name="D1" onchange=messageReveal()>
<option value="不选择">不选择</option>
<%
Set ycc = Server.CreateObject("ADODB.Connection")
ycc.open "ptdata","user","user"
user0="SELECT fabm as fabm FROM ptyfqdfa where riqi='"&date00&"' order by fabm "
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.Open user0,ycc,3,1
if not rs1.eof then
rs1.movefirst
k=1
do while not rs1.eof
kk="<option value="
kk=kk & rs1.Fields("fabm").value
if j=k then
kk=kk & "selected>" & trim(rs1.Fields("fabm").value)
else
kk=kk & ">" & trim(rs1.Fields("fabm").value)

end if
kk=kk &"</option>"
response.write kk
rs1.movenext
k=k+1
loop
end if
rs1.close
%>
</select></td>
<td width="33%" height="14"><input type="text" name="T1" size="20" value="<%
user0="SELECT lc1 as lc FROM ptyfqdfa where riqi='"&date00&"' order by fabm "
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.Open user0,ycc,3,1
if not rs1.eof then
rs1.movefirst
kkk=1
do while not rs1.eof
if j=kkk then
lc=rs1.fields("lc").value
response.write lc
end if
rs1.movenext
kkk=kkk+1
loop
end if
rs1.close


%>"></td>
<td width="34%" height="14"><select size="1" name="D2">
<%
for y= 1 to i
response.write "<option value="""&j&""">"
response.write y
response.write "</option>"
next
%></select></td>
</tr>
<%next%>
</table>

<p align="left"><input type="submit" value="确定" name="B1"></p>
</form>
</b>
</body>
</html>

当点击左边下拉菜单是,文本框的值也跟着变??
...全文
37 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
annkie 2002-12-04
  • 打赏
  • 举报
回复
具体点

87,996

社区成员

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

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