解决方案 »
- 点击追加按钮,js动态追加table,追加的table值始终为空
- 求一个JS 动态拼接 form.元素的解决方案
- 为什么得到的option的值不正确?
- 怎样才能使 <td>内容</td> 中内容不被修改!
- 写一个input,点击button,然后再弹出input
- select(multiple)可以一起增加多个已连好的option项么?(谢谢!)
- 我想用客户端JavaScript删除internet缓存中的一个cookies文件
- 请问:我想通过右键点击表格中的某一<tr></tr>里的值,然而,每一行<tr></tr>的内容都是不一样的。
- 求解为什么把显示菜单的函数放进“右击”里面就失效了
- 如何改变iframe src 只想页面内容
- 在html中怎么执行这个js函数
- 上传图片截取一部分作为头像 可以预览
firebug错误信息:
TypeError: window.frames.child is undefined改为
document.getElementById("child").document.getElementById('str').value = document.getElementById('str').value;
firebug错误信息:
document.getElementById("child").document is undefined
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script>
function send() {
window.frames['child'].document.getElementById('str').value = document.getElementById('str').value;
}
</script>
</head>
<body>
<input type='text' name='str' id='str' />
<button onclick='send()' >send the input value</button>
<iframe name='child' src='child.htm'></iframe>
</body>
</html>child页面<!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>
<title></title>
</head>
<body>
<input type='text' name='str' id='str' />
</body>
</html>
没什么问题啊