2.html
3.html
<iframe src="2.html" id="myframe">
<script js>
myframe.location.href="3.html">
var obj=myframe.document.all.button;
alert(obj);
</script>
如果没有了href 那一句当然没有错拉
但这样会提示错误
解决方案 »
- 通过JS读取数据库字段的值,然后再判断执行减法提交操作
- 创建了TBODY元素但是无法在IE6执行,FF正常执行
- 新手请教firefox下onmuoseover无效如何解决
- 如何在页面上显示一个类似于EXCLE注解那边的提示?
- 下拉菜单,火急!
- 如何让window.open()出来的窗口,出现在当前页面的后面或者屏幕的外面?
- document.value什么意思?如何修改?
- 怎样用java脚本实现 asp中 request类似的作用?? 100相送!
- JS代码冲突,三级下拉菜单与图片特效代码冲突 显示异常
- 求助 js数组与对象与递归的问题
- 关于setInterval()的问题
- 请教:在XHTML1.0过渡版DTD的声明下,对运行一些javascript代码是否有影响?
其代码如下:
function a()
{
myframe.location.href="foursystem.aspx";
productFrame=myframe.document.all;
alert(product.button.id);
}2.html 上有一个button 跟一个textbox3.html 上什么都没有
2.button 的任务就是跳到3.html当2.html 的按钮没有按下的时候也就是没有跳页的时候
按下1.html button 没错误
但按下了2.button 以后这时跳到了3.html
然后按下1.button 就出错了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function a()
{
alert(myframe.document.all.textbox2);
myframe.location.href="3.html";
alert(myframe.document.all.textbox3);
}
</script>
</head><body>
<input name="button" type="button" onclick="a()"/>
<iframe src="2.html" id="myframe" width="500px" height="500px">
</iframe>
</body>
</html>
2.html:
<body>
2.html
<input type="text" name="textbox2" />
</body>
3.html:
<body>
<p>3.html</p>
<p>
<input type="text" name="textbox3" />
</p>
</body>