查看效果
http://bbs.bc-cn.net/bbs/dispbbs.asp?boardid=15&id=32313察看代码
[CODE]
<script language="JavaScript">
function aa(tex){
dw = new Array();
//读数据库生成数组
dw[0]= new Array("111222","1","2");
dw[1]= new Array("222333","2","3");
dw[2]= new Array("333444","3","4");
dw[3]= new Array("444555","4","5");
dw[4]= new Array("555666","5","6");
for(i=0;i<=4;i++)
{if(dw[i][0]==tex){
form1.kshi.value=dw[i][1];
form1.jshu.value=dw[i][2];}
}
}
</script>
<form name="form1" method="post" action="">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="230" align="center">编号
<input type="text" name="bhao" onKeyUp="aa(this.value)">
<br>
起始
<input type="text" name="kshi"> <br>
结束
<input type="text" name="jshu"> <br>
<input type="reset" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置">
</td> <td>目前已有编号如下:<br>
111222、 222333<br>
333444、 444555<br>
555666 可以测试</td>
</tr>
</table>
</form>[/CODE]