62,072
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainFrame.aspx.cs" Inherits="JQuery_Load.MainFrame" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#DivLoad").load("LoadPage1.aspx");
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="DivLoad">
</div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LoadPage1.aspx.cs" Inherits="JQuery_Load.LoadPage1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#btn1").click(function () {
alert("试试看!");
return false;
})
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
哈哈哈
<asp:button ID="btn1" runat="server" text="btn1" />
<asp:button ID="btn2" runat="server" text="btn2" onclick="btn2_Click" />
</div>
</form>
</body>
</html>
public partial class LoadPage1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn2_Click(object sender, EventArgs e)
{
Context.Response.Write("再试试");
}
}