
ASP按钮打开新页面。
ASP里面已有一个按钮了,是传递参数的。我现在想要的功能是在ASP中再添加多一个按钮,这个按钮不是传递的,是用来打开新页面的,相当于打开一个对话框那样。那打开的新页面是正...
ASP里面已有一个按钮了,是传递参数的。我现在想要的功能是在ASP中再添加多一个按钮,这个按钮不是传递的,是用来打开新页面的,相当于打开一个对话框那样。那打开的新页面是正方形的,新页面功能是添加一条信息。当我在新页面点确定的时候,新页面关闭,原来的页面就更新信息。。
我想实现的功能可行吗?? 有实例可照吗?
希望看的明白,解答详细,满意加分。
一个问题解决了,另一个问题是。。新的页面如何在当前打开。就是一个小小的窗口那样。。 请继续解答,谢谢! 展开
我想实现的功能可行吗?? 有实例可照吗?
希望看的明白,解答详细,满意加分。
一个问题解决了,另一个问题是。。新的页面如何在当前打开。就是一个小小的窗口那样。。 请继续解答,谢谢! 展开
3个回答
展开全部
<ipnut type=button value="添加信息" onclick="winopen()"/>
<script type="text/javascript">
function winopen(){
window.open("444.htm", "newwindow1", "height=300, width=300, top=50, left=600,toolbar=yes, menubar=no, scrollbars=yes");
}
</script>
---------------------------------
----------------------------------
主窗口代码:
<form name="form1" method="post" action="">
<input type="text" name="u">
<input type="button" value="添加信息" onclick="winopen()"/>
</form>
<script type="text/javascript">
function winopen(){
window.open("444.htm", "newwindow1", "height=300, width=300, top=50, left=600,toolbar=yes, menubar=no, scrollbars=yes");
}
</script>
444.htm的代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<p>
<input type="text" name="aa">
</p>
<p>
<input type="button" name="Submit" value="确定" onClick="setvalue()">
</p><script type="text/javascript">
function setvalue(){
window.opener.document.form1.u.value=aa.value;
this.close();
}
</script>
</body>
</html>
<script type="text/javascript">
function winopen(){
window.open("444.htm", "newwindow1", "height=300, width=300, top=50, left=600,toolbar=yes, menubar=no, scrollbars=yes");
}
</script>
---------------------------------
----------------------------------
主窗口代码:
<form name="form1" method="post" action="">
<input type="text" name="u">
<input type="button" value="添加信息" onclick="winopen()"/>
</form>
<script type="text/javascript">
function winopen(){
window.open("444.htm", "newwindow1", "height=300, width=300, top=50, left=600,toolbar=yes, menubar=no, scrollbars=yes");
}
</script>
444.htm的代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<p>
<input type="text" name="aa">
</p>
<p>
<input type="button" name="Submit" value="确定" onClick="setvalue()">
</p><script type="text/javascript">
function setvalue(){
window.opener.document.form1.u.value=aa.value;
this.close();
}
</script>
</body>
</html>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
当前页添加按钮:
<ipnut type=button value="添加信息" onclick="window.open('aaaa.asp');";/>
aaaa.asp页面按钮:
<ipnut type=submit value="确定" />
提交处理后,最后一步添加脚本:
<script>parent.document.all.text1.value='提示更新成功';window.close;</script>
具体请根据你的程序进行修改。
<ipnut type=button value="添加信息" onclick="window.open('aaaa.asp');";/>
aaaa.asp页面按钮:
<ipnut type=submit value="确定" />
提交处理后,最后一步添加脚本:
<script>parent.document.all.text1.value='提示更新成功';window.close;</script>
具体请根据你的程序进行修改。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可行
用个DIV 显示/隐藏
用个DIV 显示/隐藏
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询