document.all.ObjectId.属性
document.all.ObjectId.方法()

解决方案 »

  1.   

    下面的是我自己写的,调用的是我写的一个ocx控件
    运行很好,至于applet没用过,看看是不是jvm什么的问题<%@ Language=VBScript %>
    <%dim subMenu
    dim strStatus
    OptAccessR=session("OptAccessR")
    subMenu=Request("subMenu")
    strStatus=Request("strStatus")
    %>
    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="javascript" src="/resource/globalmenu.js"></script>
    <title>主窗体</title>
    <base target="_self">
    <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
    <!--
    function window_onload() {
    var strMainMenu
    var subMenu
    var strStatus

    subMenu="<%=subMenu%>"
    strStatus="<%=strStatus%>"
    if(subMenu==""){
    strMainMenu=CustomMenu("<%=OptAccessR%>")
    subMenu=strMainMenu.substring(strMainMenu.indexOf("?")+9,strMainMenu.indexOf("&",strMainMenu.indexOf("?")+9))
    strStatus=strMainMenu.substring(strMainMenu.indexOf("&")+11,strMainMenu.indexOf("'>",strMainMenu.indexOf("&")+11))
    }
    //UserControl1.TabType(false)
    UserControl1.StatusHeight(250)
    UserControl1.BGColor(148,207,178)
    UserControl1.TabBGColor(148,207,178) 
    UserControl1.StatusInfo(strStatus)
    UserControl1.Show(subMenu)
    //TabBrowser1.Show(subMenu)
    //TabBrowser1.StatusInfo(strStatus)
    }function document_onmousedown() {
    if(event.button>=2) alert("这是什么?")
    }-->
    </SCRIPT>
    <SCRIPT LANGUAGE=javascript FOR=document EVENT=onmousedown>
    <!--
     //document_onmousedown()
    -->
    </SCRIPT>
    </head><body bgcolor="#94cfb2" topmargin=0 leftmargin=25 LANGUAGE=javascript onload="return window_onload()">
    <OBJECT id=UserControl1 style="LEFT: 0px; TOP: 0px" codeBase=/com/TabControl.CAB#version=1,0,0,11 
    classid=CLSID:F54F1283-025B-4E8A-A3DD-98528572075F VIEWASTEXT>
    <PARAM NAME="_ExtentX" VALUE="25744">
    <PARAM NAME="_ExtentY" VALUE="17277"></OBJECT>
    <!--<OBJECT id=TabBrowser1 codeBase=/com/TabControl.dll#version=-1,-1,-1,-1
    data=data:application/x-oleobject;base64,dniwns4Mr06p1TPILPsqDwADAADYEwAA2BMAAAIAAAATAP8AAAAIAAoAAABhAGQAZABkAAAACwD//wkAAAAAAAAAAAAAAAAAAAAAABMAf39/AA== 
    classid=clsid:9EB07876-0CCE-4EAF-A9D5-33C82CFB2A0F VIEWASTEXT></OBJECT>--></body></html>
      

  2.   

    http://www.csdn.net/Develop/Read_Article.asp?Id=10507
      

  3.   

    to:net_lover(孟子E章) 
    我用document.all.objectid试过,不新
    能不能给一段代码
      

  4.   

    谢谢孟子E章,不过我用<object>,not <applet>,用<applet>我已经成功了
    因为我用jdk1.3.1,如何用<object>替换<applet>
      

  5.   

    In NN3+ and IE4+ APPLET elements are reflected into js as elements of 
    the
      document.applets
    array and as properties of the document object if they are named, i.e. 
    an
      <APPLET NAME="anApplet" ...>...</APPLET>
    is scriptable as
      document.anApplet
    and 
      document.applets[appletIndexInSouce]
    Then you can access public members with the usual dot or bracket 
    notation for properties/methods:
      document.anApplet.publicProperty
      document.anApplet.publicMethod()
    or
      document.anApplet['publicProperty']
      document.anApplet['publicMethod']()
    where the last notation is important for member names like delete which 
    are keywors in js for instance the java.io.File class has a delete 
    method you would need to call as
      fileObj['delete']()Details about parameter passing/type conversion between JavaScript and 
    Java when calling into an applet are explained in the liveconnect 
    section of the client side JavaScript guide on developer.netscape.com.If you use sun's java plugin (so an EMBED tag in NN4 and an OBJECT tag 
    in IE) you can with IE call
      document.all.objectID.methodName()
    NN4 with the java plugin DOES NOT ALLOW JavaScript to call the EMBEDded 
    applet's methods.