js嵌入asp问题(急)
我想在JS里直接嵌入一个ASP页,请问是否可以?怎样加.?ASP页代码为以下:
<!--#include virtual="conn/conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>flash ad</title>
<link href="admin/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="6">
<tr>
<td><script type=text/javascript>
<!--
var focus_width=260//图片宽
var focus_height=300//图片高
var text_height=0//设置显示文字标题高度,最佳为20(如果不显示标题值设为0即可)
var swf_height = focus_height+text_height
//var pics=""
//var links=""
//var texts=""
<%
set db=conn.execute("select top 6 * from [ad] order by id desc")
i=0
do while not db.eof
pics=pics&"|"&db("imgPath")
links=links&"|"&db("link")
texts=texts&"|"&db("title")
db.moveNext
i=i+1
loop
response.write "var pics='"&right(pics,len(pics)-1)&"'"&vbcrlf
response.write "var links='"&right(links,len(links)-1)&"'"&vbcrlf
response.write "var texts='"&right(texts,len(texts)-1)&"'"&vbcrlf
%>
document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[url=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0]http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0[/url]" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="adplay.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed ID="focus_flash" src="adplay.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#C5C5C5" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="[url=http://www.macromedia.com/go/getflashplayer]http://www.macromedia.com/go/getflashplayer[/url]" />');document.write('</object>');
//-->
</script></td>
</tr>
</table>
</body>
</html>
页:
[1]