确保asdf.asp文件输出的是JS代码

解决方案 »

  1.   

    你要确保
    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&amp;links=http://|http://&amp;texts=大大大|土土土土土土&amp;borderwidth=468&amp;borderheight=60&amp;textheight=0"></EMBED> ') </BODY></html>>
    并非为纯JS代码,所以肯定是不行的.
      

  2.   

    这样说吧,你直接访问asdf.asp看浏览器输出什么?是不是纯JS脚本
    例如:如果输出alert('hello');则是正确的
    如果输出了<html>alert('hello');则是错误了,这不是JS的语法。
      

  3.   

    试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&amp;links=http://|http://&amp;texts=大大大|土土土土土土&amp;borderwidth=468&amp;borderheight=60&amp;textheight=0"></EMBED>');