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>
试试
解决方案 »
- MVC+Extjs使用Report
- 关于js的两个小问题
- vb中的splash screen以html形式实现吗?
- 这段代码怎么不是删除当前的div 而是把最后一个div删除了
- 请问如果有两个radiobutton,如何实现二者只选一的操作?
- 这个程序如何批量的使用在text文本框上>>>?????
- 用户在输入时自动将他转为小写 在线等!
- 一个自动关闭页面的问题....急.....给100 立给!!!!!
- 我要在网页中加入一个可以画图(曲线图,柱形图,K线图)的控件,请问各位大虾哪里有? 必给分!
- 手机页面textarea
- 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>