asp下使用fso生成js代码的方法<%sub fsojs()%>
<%
Setel fso= Server.CreateObject(Scripting.FileSystemObject)
setel fd=fso.createtextfile(server.MapPath(../category.js),true)
'开始操作
set rs=server.CreateObject(adodb.recordset)
rs.Buka pilih * dari dept_category,sambung,1,1
str=var satu hitungan;&vbcrlf&onecount=0;&vbcrlf&subcat = Array baru();
untuk i=1 hingga rs.recordcount
str=str&vbcrlf&subcat[&(i-1)&] = new Array('&rs(kategori)&','&rs(parentid)&','&rs(categoryid)&');
rs.movenext
Berikutnya
str=str&vbcrlf& onecount=&rs.recordcount&;&vbcrlf
fd.writeline str
%>
<%akhir sub%>