我是新手
现在有个问题,不知道怎么弄。
有两个页面a.html b.html
a.html中有一个button 一个text 点button弹出b.html 并在b.html上显示a.html中text的值
这个要怎么实现。
在线等,谢谢了。
现在有个问题,不知道怎么弄。
有两个页面a.html b.html
a.html中有一个button 一个text 点button弹出b.html 并在b.html上显示a.html中text的值
这个要怎么实现。
在线等,谢谢了。
解决方案 »
- 关于struts2中的checkbox和action 分不高但大家可以来讨论下
- 请教一个页面跳转的问题!
- servlet filter应用过滤器连续显示两次的问题
- oracle下可以用set linesize XX来控制一条数据一行显示,那mysql呢
- ireport问题:为什么显示不出粗体和斜体呢?
- 求一段 JavaScript 代码
- 进行“url编码”时, 是怎么把用户提交的gbk转成ISO8859-1的?
- 在jsp中创建数据表(mysql数据库)
- 一个关于CheckBox的问题
- hibernate 一个配置文件是否可以对应多张表呢?
- 请问如何运用Struts框架设计一个增删改的例子
- 这个方法是怎么调用的?
楼主【fanjun5】截止到2008-07-26 10:33:03的历史汇总数据(不包括此帖):
发帖的总数量:0 发帖的总分数:0 每贴平均分数:0
回帖的总数量:0 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:0 结贴的总分数:0
无满意结贴数:0 无满意结贴分:0
未结的帖子数:0 未结的总分数:0
结贴的百分比:---------------------结分的百分比:---------------------
无满意结贴率:---------------------无满意结分率:---------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
<input type="text" id="src" value="srcValue" />
<input type="button" onclick="javascript:openB();" />
<script>
function openB(){
window.open("b.html");
}
</script>b.html:
<script>
window.onload()=function(){
alert(window.opener.document.all.src.value);
}
</script>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>a.html</title>
</head><body>
<form action="b.html" target="_blank" method="get">
<input type="text" name="txt" value="" />
<input type="submit" value="Submit" />
</form>
</body>
</html>b.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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>b.html</title>
</head><body>
<script type="text/javascript">
var i, s = decodeURI(window.location.href);
if ((i = s.indexOf("?")) == -1) {
s = "";
} else {
s = s.substring(i + 1, s.length);
if ((i = s.indexOf("=")) == -1) {
s = "";
} else {
s = s.substring(i + 1, s.length);
}
}
document.write(s);
</script>
</body>
</html>
<head>
<script>
function dosubit()
{
myform.action="b.html";
myform.submit();
}
</script>
</head>
<body>
<form name=myform action="" method=post>
<input type=text name="username">
<input type=button onclick="dosubmit();">
</form>
</body>
</html>这样就可以将myform表单中的text提交到b.html中去了
可惜有长度限制