首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

请教这里错在哪里

2013-01-21 
请问这里错在哪里form nameFORM1 methodpost actionjhb.asp onsubmitreturn FORM1_onsubmit()

请问这里错在哪里


  <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>


请问这段代码怎么无效。作用就是我从JHB0中选择品名。其他文本框自动就调出去了。规格,图号,品牌
还有一个问题就是。我能不能输入品名来自动索引。而不是选择。在我这原有基础上改
[解决办法]
// ssplit函数你没定义吧,要么就有问题。。   


  function redirect(x) {
        var arr = x.split(',');
        reg.guige.value = arr[0]; // ssplit(x, ",", 0);
        reg.tuhao.value = arr[1]; //ssplit(x, ",", 1);
        reg.pinpai.value = arr[2]; // ssplit(x, ",", 2);

    }



检索可以参考这个:select对象option的autocomplete自动完成

热点排行