这个是在当前页面提交后,iframe刷新的例子<form name=frm1 >
<input type=text name=city id=city >
<iframe frameborder=0 id="frame1" name="frame1" width=50 height=15 marginheight=0
marginwidth=0 scrolling=no ></iframe>
<input type=button name=submit value="submit" onclick=getVal()>
</form>
<script language =javascript >
<!--
var c = eval(frm1.city);
function getVal(){
var iframe = document.getElementById("frame1");
iframe.src= "b.asp?city="+c.value;
}
//-->
</script>
<input type=text name=city id=city >
<iframe frameborder=0 id="frame1" name="frame1" width=50 height=15 marginheight=0
marginwidth=0 scrolling=no ></iframe>
<input type=button name=submit value="submit" onclick=getVal()>
</form>
<script language =javascript >
<!--
var c = eval(frm1.city);
function getVal(){
var iframe = document.getElementById("frame1");
iframe.src= "b.asp?city="+c.value;
}
//-->
</script>
解决方案 »
- JS问题
- javascript和java中的数据类型获取和转换问题
- 对于不可控的服务端,如何读取其JSON?
- AJAX,xmlHttp.responseText不能获取 JavaScript输出的字符吗?
- jd内的广告连接在新窗口打开?
- [倒计时制作]如何让倒计时更加精准
- 函数变量与字符串相加的问题
- 求自动修改主页代码!!急 啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 关于搜狗浏览器自动填充功能的问题
- 如何将</frame>中的输入框总的value值传入它的前一个页面的输入框中?
- 过滤特殊字符, 为什么有的过滤不掉?
- 急急急!!! 在web开发中,如何在html或javascript代码(客户端)得到当前域名,?送分
祝你在新的一年里往事如意,财源广进!!!!!
if (!self.closed){ //窗口未關掉,則Refresh
window.location.reload(true); }
<!--
var c = eval(frm1.city);
function getVal(){
document.all.fram1.src= "b.asp?city="+c.value;
}
//-->
</script>
这个方法就可以了