打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
在一个frame里修改另外一个frame里的值


已有 99 次阅读2017-4-24 23:22 |个人分类:技术日志| frame

index.html代码:
<frameset id="frameset" rows="29,*,20" cols="*" frameborder="no" scrolling="no">
    <frame name="Thetop" src="sub1.html"  scrolling="no"  noresize />
    <frame name="Themain" src="sub2.html"  scrolling="no" noresize />
</frameset>

sub1.html
<table>
    <tr>
        <td>姓名:</td><td><input type="text" name="userName"/></td>
        <td>个人编号:</td><td><input type="text" name="grbh"/></td>
    </tr>
</table>

sub2.html
<hr>
李主任
0015431666
<input type="button" name="test" value="test" onclick="test('李主任','0015431666')"/>
<script language="javascript">
function test(uname,grbh)
{
    parent.frames["Thetop"].document.all.userName.value=uname;
    parent.frames["Thetop"].document.all.grbh.value=grbh;
}
</script>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
IP Frame
Tkinter教程之Frame篇
判断网页是否在iframe或frame中-YAOYOA
禅绕图谱小视频:A形框架 (A-Frame)
Archer
YUV文件格式 - jack的视频编码工作台 - IT博客网
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服