<script language="javascript" src="asdf.asp?cname=spell"></script>
-----asdf.asp文件----------
程序代码
<!--#include file="conn.asp"-->
<%
cname=request.QueryString("cname")
turl=request.ServerVariables("URL")
sql="select gongsi from company where cname='"+cname+"'"
rs.open sql,connstr,1,1
do while not rs.eof
Response.Write "document.write("" <table width=100% border=0><tr bgcolor=#ECE9D8> "");"
Response.Write "document.write("" <td width=100>" & Rs("gongsi") & "</td> "");"
Response.Write "document.write("" </tr><tr height=3></tr></table> "");"
'Response.Write(gsname)
rs.movenext
loop
Response.Write "document.write("""&turl&""");"
%>
注意:js中的";"(分号)很重要,掉了就很难调试出!