JS中怎么把页面的值传到iframe中的页面中去 页面A中有一个文本框A 一个Click按钮 和一个iframe iframe中有个页面B 页面B中有个 文本框B 怎么把 文本框中的A 接受的值 通过一个Click的按钮传到 文本框B 中去 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 JS 通过iframe访问文本框了. aa.html<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><script type="text/javascript"> window.onload = function(){ var bhtml = document.getElementById('bhtml').contentWindow; document.getElementById('click').onclick = function(){ var text = document.getElementById('avalue').value; bhtml.location.href = "bb.html#" + text; }; };</script></head><body> <iframe id="bhtml" width="400" height="400"></iframe> <input type="text" id="avalue" /> <input type="button" id="click" value="click me" /></body></html>bb.html<html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><script type="text/javascript"> window.onload = function(){ var avalue = location.hash.substring(1); document.getElementById('bvalue').value = avalue; };</script></head><body> <input type="text" id="bvalue" /></body></html> document.getElementById("btnId").onclick= function() { window.frames["iframeId"].document.getElementById("textB").value = document.getElementById("textA").value;} 怎么让这个鼠标移动上去的时候延迟2秒才促发animate呢 frameset页面跳转问题 Jquery ajax调用 WebService 如何根据一个名称取js多维数组里的信息? javascript 的难度问题,谁会的 急!求两个正则表达式 一起来交流prototype,moontools框架 用js动态控制整个系统的css样式表 点击"刷新",本页面没有反映,怎么回事? 关于打印的问题? 谁有或者哪里有Jsp的小项目吗?刚学jsp不要太复杂的 JS动态获得1个数组 保存起来以保证刷新后还存在 睡觉前结贴。希望高人无聊的时候给我看看
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
window.onload = function(){
var bhtml = document.getElementById('bhtml').contentWindow;
document.getElementById('click').onclick = function(){
var text = document.getElementById('avalue').value;
bhtml.location.href = "bb.html#" + text;
};
};
</script>
</head><body>
<iframe id="bhtml" width="400" height="400"></iframe>
<input type="text" id="avalue" />
<input type="button" id="click" value="click me" />
</body>
</html>bb.html<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
window.onload = function(){
var avalue = location.hash.substring(1);
document.getElementById('bvalue').value = avalue;
};
</script>
</head><body>
<input type="text" id="bvalue" />
</body>
</html>
document.getElementById("btnId").onclick= function() {
window.frames["iframeId"].document.getElementById("textB").value = document.getElementById("textA").value;
}