<script src="../Js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#a_doClick").click(function () {
                $("#<%=btnTest.ClientID%>").click();
            })
        })
    </script>

  

<a >触发Button的Click事件</a>
<asp:Button runat="server" ID="btnTest" Text="测试js触发事件" OnClick="btnTest_Click" />

  

 protected void btnTest_Click(object sender, EventArgs e)
        {
           Response.Redirect("http://www.baidu.com");
        }

 

  最主要的是<%=btnTest.ClientID%>

 

相关文章:

  • 2022-02-04
  • 2022-01-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2021-05-30
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
相关资源
相似解决方案