想要实现点击一个按钮弹出一个新页面,原页面不刷新,原页面上有dropdownlist 和文本框等东西,求点按钮后 DropDownList 选择的项不变,文本框内容也不能清空 目前是这样弹出页面的
Response.Write("<script>window.open('xxx.aspx?sr=" + sr + "','_blank')</script>");
Response.Write("<script>window.open('xxx.aspx?sr=" + sr + "','_blank')</script>");
{
window.open('xxx.aspx?sr=sr','_blank');
return false;
}
就不要用cs些代码 了 直接
<input type="button" value="返回" onclick="javascript:history.back()" />
改下onclick事件
{
window.open("xxx.aspx?sr="+sr+","_blank");
return false;
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<form action="http://news.sina.com.cn" method="get" name="form1" target="_blank" id="form1">
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</form>
</body>
</html>在action是动作...动作的内容就是打开http://news.sina.com.cn
target="_blank" 是以新页面打开...你将上面的内容保存到aaa.html然后运行一下就知道了... -------------------------------------------以上内容是搜索出来的
sr就是你页面要传的值