onclick="xx();document.all.b.click()">

解决方案 »

  1.   

    <td><a href="javascript:btn_click(4, 'up');document.all.MapView.OnLButtonDown()"><img title="放大" name="zoomin" src="images/icon_zoomin.gif" width="33" height="33" class="IconLinks"></a></td>我用的是一个控件
    它肯定有那个事件
      

  2.   

    你直接调用
    另外一个
    按钮中的 onclick事件指向的方法不行吗?
    除了不能获取点击时的事件对象外,别的应该都没有影响。
      

  3.   

    孟子的是正确的onclick="javascript:alert('test!');document.all.b.click();">
      

  4.   

    <input type="button" name="b" onclick="javascript:alert('button b clicked!');">
      

  5.   

    document.all****中的all是什么作用??
      

  6.   

    不行 我需要一些点击对象时自动激发的方法,document.all.b.click()这种方法是把事件当成方法来调用 只有DOCUMENT对象中的子集对象才能用这种方法吧 问题还是没解决啊 哎 谢谢大家 还有更好的方法吗?
      

  7.   

    fireEvent Method  Internet Development Index --------------------------------------------------------------------------------Fires a specified event on the object.SyntaxbFired = object.fireEvent(sEvent [, oEventObject])
    ParameterssEvent Required. String that specifies the name of the event to fire. 
    oEventObject Optional. Object that specifies the event object from which to obtain event object properties. Return ValueBoolean. Returns one of the following values:true Event fired successfully. 
    false Event was cancelled. ResIf the event being fired cannot be cancelled, fireEvent always returns true. Regardless of their values specified in the event object, the values of the four event properties—cancelBubble, returnValue, srcElement, and type—are automatically initialized to the values shown in the following table. Event object property Value 
    cancelBubble false 
    returnValue true 
    srcElement element on which the event is fired 
    type name of the event that is fired 
    ExampleThe following sample shows how to use the fireEvent method.HideExample<HTML>
    <HEAD>
    <SCRIPT>
    function fnFireEvents()
    {
    oDiv.innerText = "The cursor has moved over me!";
    oButton.fireEvent("onclick");
    }
    </SCRIPT>
    </HEAD>
    <BODY>
    <h1>Using the fireEvent method</h1>
    By moving the cursor over the DIV below, the button is clicked.
    <P>
    <DIV ID="oDiv" onmouseover="fnFireEvents();">
    Mouse over this!
    </DIV>
    <p>
    <BUTTON ID="oButton" ONCLICK="this.innerText='I have been clicked!'" >
    Button</BUTTON>
    </BODY>
    </HTML>
      

  8.   

    我要调用的不是一个DOCUMENT子对象的事件 而是一个ACTIVEX对象的事件 FIREEVENT也不行啊 它总说参数错误,给参数也说 不给参数也说 但那个控件的事件肯定没有问题。