62,046
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebService2.WebForm1" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<input type="text" id="text1" />
<input type="button" value="dsdf" onclick= "window.open('WebForm2.aspx')"/>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="WebForm2.aspx.cs" Inherits="WebService2.WebForm2" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" onchange="window.opener.document.all.text1.value=document.all.DropDownList1.options[document.all.DropDownList1.selectedIndex].value;window.close();" runat="server">
<asp:ListItem Value="0" Text="请选择"></asp:ListItem>
<asp:ListItem Value="123" Text="456"></asp:ListItem>
<asp:ListItem Text="654" Value="1321"></asp:ListItem>
</asp:DropDownList></div>
</form>
</body>
</html>
<html>
<head>
<title>父页面</title>
<script language="javascript">
function SelSex()
{
window.open('son.htm');
}
</script>
</head>
<body>
<input type="text" id="content"/>
<input type="button" onclick="SelSex()" value="选择"/>
</body>
</html>
<html>
<head>
<title>子页面</title>
<script>
function SelDone()
{
window.opener.document.getElementById('content').value = document.getElementById('sex').value;
window.close();
}
</script>
</head>
<body>
<select id="sex">
<option value="男">男</option>
<option value="女">女</option>
</select>
<input type="Button" value="选好了" onclick="SelDone();"></input>
</body>
</html>
<!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 id="Head1" runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
// <!CDATA[
function Button1_onclick() {
window.showModalDialog("MDW.aspx",window,"dialogWidth:400px;dialogHeight:320px;help:no;");
("MDW.aspx","","dialogWidth:400px;dialogHeight:320px;help:no;");
}
function TextArea1_onclick(arg) {
var _this = arg;
alert(_this.value)
}
function Text1_onclick() {
alert(window.document.form1.Text1.value);
}
// ]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<textarea id="TextArea1" style="width: 245px;" onclick="return TextArea1_onclick(this)" rows="5"></textarea>
<input id="Button1" type="button" value="button" onclick="return Button1_onclick()" />
<input id="Text1" type="text" value="asdfsa" onclick="return Text1_onclick()" /></div>
</form>
</body>
</html>
<!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 language="javascript" type="text/javascript">
// <!CDATA[
var w;
if (window.dialogArguments != null)
w = window.dialogArguments;
function Select1_onclick() {
w.form1.TextArea1.value+=document.getElementById("Select1").value+",";
}
// ]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<select id="Select1" multiple="multiple" style="width: 176px; height: 87px" language="javascript"
onclick="return Select1_onclick()">
<option selected="selected" value="aaa">aaa</option>
<option value="bbb">bbb</option>
<option value="ccc">ccc</option>
<option></option>
</select>
</div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="ExceptionLog.Demo.Web.WebForm2" %>
<!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>Untitled Page</title>
<script type="text/javascript">
function test()
{
var str = window.showModalDialog("WebForm3.aspx", "Status:No;DialogWidth:350px;DialogHeight:250px;help:no")
alert(str);
document.getElementById('<%=TextBox1.ClientID %>').value = str;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input id="Button1" type="button" value="button" onclick="test()" /></div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="ExceptionLog.Demo.Web.WebForm3" %>
<!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>Untitled Page</title>
<script type="text/javascript">
function getData()
{
window.returnValue = document.getElementById('<%=TextBox1.ClientID %>').value;
window.close();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input id="Button1" type="button" value="button" onclick="getData()" />
</div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.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>Default</title>
<script language="javascript" type="text/javascript">
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" PostBackUrl="~/Default2.aspx" Text="Button" /></div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
</asp:DropDownList></div>
</form>
</body>
</html>
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using EastGiftData;
using EastGiftLibrary;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (this.Request.QueryString["t"] != null)
{
this.TextBox1.Text = this.Request.QueryString["t"].ToString();
}
}
}
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string test = this.DropDownList1.Text;
Response.Redirect("default.aspx?t="+test);
}
}