前端代码:
<a href="javascript:;" class="layui-btn" onclick="reportExcel()">导出Excel</i></a>
<form id="form1" runat="server"> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> </form>
后端代码
protected void Button1_Click(object sender, EventArgs e) { //随便写 Response.Write("hellow wordl"); }
Jquery代码:
function reportExcel() { $("#<%=Button1.ClientID%>").click(); }