利用ASP嵌套JS+SQL Server打造两级连动下拉框(二)

网络整理 - 07-26
      利用ASP嵌套JS+SQL Server打造两级连动下拉框(2)

strJscript=""

dim i

While Not Rs.Eof

Rs.MoveNext

Response.Write("S.category.options["+CStr(i)+"].value="+chr(34)+"

Response.Write("}")&chr(13)

Set Rs=Nothing

Rs.open SQL,conn,1,1

j=0

Num(j)=Rs("Num")

Rs.MoveNext

end if

if Not Rs.Eof then

Response.write("if(valuecategory.indexOf("+chr(34)+"

dim NextLevel,UpCatCode,overflow

strJscript=""

strJscript="else if(valuecategory.indexOf("+chr(34)+UpcateCode+chr(34)+")==0){"+chr(13)

j=j+1

              NextLevel="Y"