javascript
<script type="text/javascript">
function Function() {
var button = document.getElementById("<%=Button1.ClientID %>");
button.click();
</script>
asp.net
<input type="text" onkeydown="Function()" />
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" Style="display: none" Visible="True" />
C#
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("WebForm1.aspx");
}
}
沒有留言:
張貼留言