📄 test.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="_Default" %>
<!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>
<%--<link href="StyleSheet.css" rel="stylesheet" type="text/css" />--%>
<link href="" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
var xmlhttp;
function getData()
{
//创建异步对象
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
//加载服务器-注意URL参数的使用
xmlhttp.Open("GET","Test2.aspx",true)
//异步对象事件挂钩
xmlhttp.onreadystatechange=stateChange;
//发送请求-无参数
xmlhttp.Send(null);
}
function stateChange()
{
if(xmlhttp.readystate==4 && xmlhttp.status==200)
{
//获取所有返回的数据
var data=xmlhttp.ResponseText;
//过滤自己需要的数据
document.getElementById("TextBox3").innerText=data;
//显示结果
}
}
</script>
</head>
<body style="background-image: url(BG/showbj.gif)" background="BG/showbj.gif">
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Label1"></asp:Label>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button1" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Button2" />
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="Button" />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:GridView ID="GridView1" runat="server" BackColor="White"
BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" CellPadding="4"
GridLines="Horizontal" Height="167px" Width="488px" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" PageSize="3" AutoGenerateColumns="False">
<FooterStyle BackColor="White" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="a" HeaderText="年级" />
<asp:BoundField DataField="b" HeaderText="班级" />
<asp:BoundField DataField="t" HeaderText="辅导员" />
</Columns>
<RowStyle BackColor="White" ForeColor="#333333" />
<SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="White" ForeColor="Red" HorizontalAlign="Center" />
<HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" Font-Bold="True"
Font-Size="12px" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
Width="80px">
<asp:ListItem Value="Department.Desn">所属部门</asp:ListItem>
<asp:ListItem Value="Grade.Desn">所属年级</asp:ListItem>
<asp:ListItem Value="Teacher.Name">辅导员</asp:ListItem>
</asp:DropDownList><asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
Font-Bold="True" Font-Size="12px" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged"
Width="100px">
</asp:DropDownList>
<asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="查询" />
<asp:Label ID="Label3" runat="server" Text="内容:"></asp:Label>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<input type="button" value="显示" onclick="getData()" style="width: 47px; height: 44px" id="Button5" />
<input id="Text1" type="text" /></div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -