日期:2014-05-18  浏览次数:20468 次

里面有一个vbscript的脚本,请高手帮我改成js的,谢谢啊!
<OBJECT   classid=clsid:5EEEA87D-160E-4A2D-8427-B6C377FEDA4D   id=t>
  </OBJECT>

  <script   language   =   vbscript>
  Function   window()
    <%If   szSession   <>   " "   Then%>
   Set   objProp   =   t.GetObject( "Property ")
   objProp.value( "Username ")   =   <%=szName%>
   objProp.value( "LoginSession ")   =   <%=szSession%>
   objProp.value( "ServerAddress ")   =   "127.0.0.1 "   'RTX   Server   IP地址  
      objProp.value( "ServerPort ")   =   8000

   t.Invoke   2,   objProp   '2表示通过SessionKey登录  
      <%EndIf%>  
  End   Function
  </script>


------解决方案--------------------
Set objProp = t.GetObject( "Property ")
把這里的Set去掉,每行最后加上 "; "
------解决方案--------------------
<script language = javascript>
  Function window()
{
    <%If szSession <> " " Then%>
   objProp = t.GetObject( "Property ");
   objProp.value( "Username ") = <%=szName%> ;
   objProp.value( "LoginSession ") = <%=szSession%> ;
   objProp.value( "ServerAddress ") = "127.0.0.1 "; //RTX Server IP地址
    objProp.value( "ServerPort ") = 8000;

   t.Invoke(2, objProp); //2表示通过SessionKey登录
    <%EndIf%>
  }
  </script>

------解决方案--------------------
<script language = vbscript>
  function window()
{
   if( " <%=szSession%> " != " ")
{   
var objProp = t.GetObject( "Property ");
   objProp[ "Username "].value= " <%=szName%> ";
   objProp[ "LoginSession "].value= " <%=szSession%> ";
   objProp[ "ServerAddress "].value= "127.0.0.1 ";// 'RTX Server IP地址
    objProp[ "ServerPort "].value= 8000;

   t.Invoke( 2, objProp);// '2表示通过SessionKey登录
    }
 }
  </script>
------解决方案--------------------
" <%=szName%> "这样的变量都认为是全局变量处理,属于服务器端脚本
看了程序才知道具体怎么写,我现在只能是看表面翻译