转载:JS触发服务器控件的单击事件
原文地址:http://blog.csdn.net/joyhen/article/details/8485321
<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 id="a_doClick">触发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%>
                    
                
                
            
        
浙公网安备 33010602011771号