<script language="vbscript" runat="server"> Function getnum(a,b) dim c,sql,num1,num,rs,insect_num c=replace(a,"'",b) sql="select * from PER_Client where num like '%c%'" set rs =cn.execute(sql) if rs.eof then num1="c000001" else do while not rs.eof num=num+1 rs.movenext loop num=num+1 for i=1 to (6-clng(len(num))) insect_num="0" & num next num1="c" & num end if end Function </script> 大家看看我能得到值c&NUM
问题很严重啊``~~ 现在调试的结果竟然是说我缺少END语句,请大哥们在指点一下 错误如下 <script language="vbscript" runat="server"> Function getnum(a,b) dim c,sql,num1,num,rs,insect_num c=replace(a,"'",b) sql="select * from PER_Client where num like '%"&c&"%'" set rs =cn.execute(sql) if rs.eof then num1="c000001" else do while not rs.eof num=num+1 rs.movenext loop num=num+1 for i=1 to (6-clng(len(num))) insect_num="0" & num next num1="c" & num end if End function '(这行提示)缺少end语句 </script>