<%
db="/data/fy2sc.mdb"'这里修改数据库路径或名称
Set conn = Server.CreateObject("ADODB.Connection")
dbpath="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.Open dbpath


parentId = request.QueryString("parentId")

tt_id  = ""
tt_text= ""

set rs_123 = server.CreateObject("adodb.recordset")
rs_123.open "select * from carSort where parentId = "& parentId &" order by id asc",conn,1,1

do while not rs_123.eof
	tt_id   = tt_id   & rs_123("id")       & "#"
	tt_text = tt_text & rs_123("sortName") & "#"
rs_123.movenext
loop

rs_123.close
set rs_123 = nothing

if  tt_id   <> "" then tt_id   = left(tt_id,len(tt_id)-1)	     	'去除最后一个#
if  tt_text <> "" then tt_text = left(tt_text,len(tt_text)-1)		'去除最后一个#

'response.write tt_id &"<br><br><br>" & tt_text
'response.End()
%>
<script language="javascript">

var zhi_id = "<%=tt_id%>";
var zhi_text = "<%=tt_text%>";

var arr_id = new Array();
var arr_text = new Array();
arr_id   = zhi_id.split("#");
arr_text = zhi_text.split("#");


var sel = parent.document.getElementById("sort4");
sel.options.length = 0;
sel.options.add(new Option("请选择",""));
for(var i = 0;i < arr_id.length;i++)
{   
	sel.options.add(new Option(arr_text[i],arr_id[i]));
}
</script>