index.html
<html> <body>
<input id="value" type="text" value="10">
<iframe id=a src="a.html" width="200" height="100"> </iframe>
<iframe id=b src="b.html" width="200" height="100"> </iframe>
</body> </html> a.html
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(b.value.value)+parseInt(this.value);" value="10">
</body> </html> b.html
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(a.value.value)+parseInt(this.value);" value="10">
</body> </html>
试试
<html> <body>
<input id="value" type="text" value="10">
<iframe id=a src="a.html" width="200" height="100"> </iframe>
<iframe id=b src="b.html" width="200" height="100"> </iframe>
</body> </html> a.html
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(b.value.value)+parseInt(this.value);" value="10">
</body> </html> b.html
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(a.value.value)+parseInt(this.value);" value="10">
</body> </html>
试试
解决方案 »
- 在登陆的时候输入验证码如果验证错误就不提交,该怎么做?怎样在js比较是否验证成功
- html里调用javascipt变量
- 正则表达式 HTML标签替换 请教高手
- 合成优化一下代码 3q
- Ext 基础
- getElementsById的用法怎么使用
- 简体中文版的梅花雨日历控件3.0版下载
- Windows2000 javascript文件 *.js 中如何让操作系统关闭shutdown 重起reboot
- 如何做当关闭一个窗口而另外一个窗口刷新一次??
- 想问一下Python +selenium 怎么实现页面跳转
- javascript 实现图片随着网页的滚动而上下滚动
- 各位牛人,javascript时间换算问题!
<html> <body>
<input id="value" type="text" value="10">
<iframe name="a" src="a.html" width="200" height="100"> </iframe>
<iframe name="b" src="b.html" width="200" height="100"> </iframe>
</body> </html> a.html
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(window.parent.b.value.value)+parseInt(this.value);" value="10">
</body> </html> b.html
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(window.parent.a.value.value)+parseInt(this.value);" value="10">
</body> </html>
<html> <body>
<input id="value" type="text" value="10">
<iframe id="a" src="a.html" width="200" height="100"> </iframe>
<iframe id="b" src="b.html" width="200" height="100"> </iframe>
</body> </html> a.html
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(window.parent.b.value.value)+parseInt(this.value);" value="10">
</body> </html> b.html
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(window.parent.a.value.value)+parseInt(this.value);" value="10">
</body> </html>
<iframe src="hits.asp?keywordsid=<%=rs("id")%>" name="<%=rs("id")%>>
这样该如何处理呢?
<html> <body>
<input id="value" type="text" onChange="window.parent.value.value=parseInt(window.parent.b.value.value)+parseInt(this.value);" value="10">
</body> </html>
那就更简单了
把window.parent.b.value.value替换成window.parent.["&request("keywordsid")&"].value.value
<html> <body>
<script>function sumValue(){
value.value=0;
<%do while not rs.eof%>
value.value=value.value+<%=rs("id")%>.value.value
<%rs.movenext
loop%>
}
</script>
<input id="value" type="text" value="10">
<%do while not rs.eof%>
<iframe src="hits.asp?keywordsid= <%=rs("id")%>" name="<%=rs("id")%>" id="<%=rs("id")%>">
<%rs.movenext
loop%>
</body> </html>
--------------------------------
hits.asp
<html> <body>
<input id="value" type="text" onChange="window.parent.sumValue();" value="10">
</body> </html>
或者你可以这样写
<script>function sumValue(){
value.value=0;
<%do while not rs.eof%>
value.value=value.value+<%=rs("id")%>.value.value
<%rs.movenext
loop%>
}
</script>就是这段
index.html
<html> <body>
<%
'这里写打开记录集的代码!
sql="select * from table"
rs.open sql,conn,1,1
%>
<script>function sumValue(){
value.value=0;
<%do while not rs.eof%>
value.value=value.value+<%=rs("id")%>.value.value
<%rs.movenext
loop%>
}
</script>
<input id="value" type="text" value="10">
<%
rs.movefirst
do while not rs.eof%>
<iframe src="hits.asp?keywordsid= <%=rs("id")%>" name="<%=rs("id")%>" id="<%=rs("id")%>">
<%rs.movenext
loop%>
</body> </html>
--------------------------------
hits.asp
<html> <body>
<input id="value" type="text" onChange="window.parent.sumValue();" value="10">
</body> </html>