http://lucky_elove.www1.dotnetplayground.com/ShowDetail.aspx?id=9EEAFE96-3393-4228-A19C-C85A1456D104

解决方案 »

  1.   

    上面的是孟兄老窝吗,俺对你的Netscape 技术狠支持哟,可怜的NS ..
      

  2.   

    比如你的页面上有两个按钮,ID分别为btn1和btn2,
    用javascript重写btn1的触发函数(在html中btn1的定义中加 onclick='btnClick()')
    function btnClick()
    {
        _doPostBack("btn2","");
    }
    然后页面酒会触发返回到服务器,不过服务器端处理的是btn2的事件处理方法
      

  3.   

    1.首先在<form name="Form1">中加两个隐藏的<input>:
    <input type="hidden" name="__EVENTTARGET"><input type="hidden" name="__EVENTARGUMENT">,(必须如此,input的名字不能改变)
    2.加两个按钮<input type="button" name="btn1" onclick="__doMyPostBack('btn1','')")
    <asp:button id="btn2">
    3.写如下函数:
    function  __doMyPostBack(eventTarget, eventArgument) {
    var theform = document.Form1;
    theform.__EVENTTARGET.value = eventTarget;
    theform.__EVENTARGUMENT.value = eventArgument;
    theform.submit();
    }
    4.好了,当你点击btn1时,就会触发btn2的Click事件。
      

  4.   

    孟子E章所给的网页打不开Server Error in '/' Application.
    --------------------------------------------------------------------------------The resource cannot be found. 
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested Url: /ShowDetail.aspx
      

  5.   

    用Delegate跟event也可以实现........
      

  6.   

    请问__doPostBack后是否可以让页面执行一段JS代码