试asdf.asp:document.write('<SCRIPT language=javascript src="http://localhost/ks_inc/loadflash.js" type=text/javascript></SCRIPT>'); var focus_width=468; var focus_height=60; var text_height=0; var pics='/Upfiles/2008010119415169686.jpg|/Upfiles/200801101121176595.jpg'; var links='http://|http://'; var texts='大大大|土土土土土土'; LoadFlash('http://localhost/KS_Inc/Slideviewer.swf','transparent',focus_width,focus_height+text_height,'pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height) document.write('<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=http://localhost/KS_Inc/Slideviewer.swf width=468 height=60 type=application/x-shockwave-flash quality="high" wmode="transparent" FlashVars="pics=/Upfiles/2008010119415169686.jpg|/Upfiles/200801101121176595.jpg&links=http://|http://&texts=大大大|土土土土土土&borderwidth=468&borderheight=60&textheight=0"></EMBED>');
asdf.asp文件输出的是纯js代码.
但你上面说asdf.asp文件内容为:
<html><HEAD></HEAD>
<BODY>document.write('
<SCRIPT language=javascript src="http://localhost/ks_inc/loadflash.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript>
var focus_width=468;
var focus_height=60;
var text_height=0;
var pics='/Upfiles/2008010119415169686.jpg|/Upfiles/200801101121176595.jpg';
var links='http://|http://';
var texts='大大大|土土土土土土';
LoadFlash('http://localhost/KS_Inc/Slideviewer.swf','transparent',focus_width,focus_height+text_height,'pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height)
</SCRIPT>
<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=http://localhost/KS_Inc/Slideviewer.swf width=468 height=60 type=application/x-shockwave-flash quality="high" wmode="transparent" FlashVars="pics=/Upfiles/2008010119415169686.jpg|/Upfiles/200801101121176595.jpg&links=http://|http://&texts=大大大|土土土土土土&borderwidth=468&borderheight=60&textheight=0"></EMBED> ') </BODY></html>>
并非为纯JS代码,所以肯定是不行的.
例如:如果输出alert('hello');则是正确的
如果输出了<html>alert('hello');则是错误了,这不是JS的语法。
var focus_width=468;
var focus_height=60;
var text_height=0;
var pics='/Upfiles/2008010119415169686.jpg|/Upfiles/200801101121176595.jpg';
var links='http://|http://';
var texts='大大大|土土土土土土';
LoadFlash('http://localhost/KS_Inc/Slideviewer.swf','transparent',focus_width,focus_height+text_height,'pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height)
document.write('<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=http://localhost/KS_Inc/Slideviewer.swf width=468 height=60 type=application/x-shockwave-flash quality="high" wmode="transparent" FlashVars="pics=/Upfiles/2008010119415169686.jpg|/Upfiles/200801101121176595.jpg&links=http://|http://&texts=大大大|土土土土土土&borderwidth=468&borderheight=60&textheight=0"></EMBED>');