当前页面: 开发资料首页 → Javascript 专题 → asp结合javascript,xml,sqlserver制作的无刷新二级select
摘要: asp结合javascript,xml,sqlserver制作的无刷新二级select
源代码:<%@ LANGUAGE="vbscript" %>
<%
strPathInfo = Request.ServerVariables("PATH_INFO")
strPathInfo = "http://" & Request.ServerVariables("SERVER_NAME") & Left(strPathInfo,InstrRev(strPathInfo,"/"))
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Provider = "sqloledb"
Conn.Open "Data Source=192.168.1.114;Initial Catalog=pubs;", "sa", "hans"
Set RS = Conn.Execute("SELECT DISTINCT sheng FROM test")
arrPr = RS.GetRows()
RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
%>
<head>
<?xml version="1.0" encoding="gb2312"?>
<%For i = LBound(arrCity,2) To UBound(arrCity,2)%>
<%Next%>
使用时注意修改数据库相关信息