日期:2014-05-16 浏览次数:21102 次
<form name=FORM1 method="post" action="jhb.asp" onsubmit="return FORM1_onsubmit()" language=javascript>
<tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'>
<% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>"> <% End If %>
<td height="18" align="center" class="but1" >
<select name="pinming" onChange="redirect(this.options.value);
document.getElementById('pinming1').value=this.options[this.selectedIndex].text;">
<%
set rss=server.CreateObject("adodb.recordset")
rss.open "select * from jhb0 ",conn,1,1
if rss.eof and rss.bof then
%>
<option value="">暂无数据</option>
<%
else
%>
<option value="0">请选择品名</option>
<%
do while not rss.eof
if isedit then
if rs("pinming")=rss("pinming") then
pinmingg=rss("pinming")
%>
<option value="<%=rss("pinming")%>" selected="selected"><%=rss("pinming")%></option>
<%
else
%>
<option value="<%=rss("guige")+","+rss("tuhao")+","+rss("pinpai")%>">
<%=rss("pinming")%></option>
<%
end if
else
%>
<option value="<%=rss("guige")+","+rss("tuhao")+","+rss("pinpai")%>">
<%=rss("pinming")%></option>
<%
end if
rss.movenext
loop
%>
</select>
<script language = "JavaScript">
<!--
var groups=document.reg.pinming.options.length;
var group=new Array(groups);
for (i=0; i<groups; i++)
group[i]=new Array();
group[10][10]=new Option("xxx","xxx");
var temp=document.reg.pinming;
function redirect(x)
{
reg.guige.value = ssplit(x,",",0);
reg.tuhao.value = ssplit(x,",",1);
reg.pinpai.value = ssplit(x,",",2);
}
//-->
</script>
<input readonly type="hidden" name="pinming1" id="pinming1" value="<%
if isedit then
response.Write pinmingg
end if
%>">
<%
end if
rss.close
set rss=nothing
%>
</td>