<script type="text/javascript">
function index_FSCommand(command, args){
if (command.toLowerCase() == "quit")
{
window.close();

else if (command.toLowerCase() == "settitle")
{
window.document.title = args; 
}
}
</script>

解决方案 »

  1.   

    谢谢,测试了一下好像不行,不知道哪里不对,我把原来的页面全部放过来。
       <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
        <head>
        <meta http-equiv="Content-Type" c />
        <title>电子杂志--北大荒在线浏览</title>
        </head>
        <body bgcolor="#ffffff" topmargin="0" leftmargin="0" scroll="no">
        <!-- 影片中使用的 URL-->
        <!-- 影片中使用的文本-->
        <!-- saved from url=(0013)about:internet -->
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com ... flash.cab#version=8,0,0,0" width="100%" height="100%" id="index" align="middle" VIEWASTEXT>
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="movie" value="index.swf?online=true" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="index.swf?online=true" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="index" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>
        <script language="VBScript">
        Sub index_FSCommand(ByVal command, ByVal args)
        If LCase(command) = "quit" Then
        window.close
        ElseIf LCase(command) = "settitle" Then
        window.document.title = args
        End If
        End Sub
        </script>
        </body>
        </html>
      

  2.   

    光改这一个地方是不行的,因为这段脚本只所以能运行是因为他被其他脚本调用了
    而其他脚本很可能也是vbs脚本
      

  3.   

    1楼的函数没有问题,不过要求参数command必须是string类型的。看看你变量定义和传入的参数类型
      

  4.   

    index_FSCommand这样的函数名字原来起作用吗?
      

  5.   

    to 楼上:这个应该是flash脚本as与html脚本交互时调用的方法可能这种交互机制在linux下也不适合吧建议楼主先在window下改成js试试能否执行
      

  6.   

    不过,一般web服务器无所谓的,只要客户端是windows就没问题了
      

  7.   

    抱歉,一直在忙活服务器的事儿,这个就暂时放下了,今天来结帖。感谢所有楼,那个js在win环境下也是没有用的。
    fosjos说的应该是问题的所在。