html中子页面给父页面赋值,关闭子页面给父页面传值,父页面条件按子页面设置查询
2012-12-11 16:08
260 查看
father.html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>father.html</title> <script > function assignment(content) { document.getElementById("fvalue").value = content;//赋值 } function openwindow(url,name,iWidth,iHeight) { var url; //转向网页的地址; var name; //网页名称,可为空; var iWidth; //弹出窗口的宽度; var iHeight; //弹出窗口的高度; var iTop = (window.screen.availHeight-30-iHeight)/2; //获得窗口的垂直位置; var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置; window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no'); } </script> </head> <body> <input type="text" name="fvalue" id="fvalue" value="请按按钮设置条件" /> <br/> <br/> <input type="button" name="btn" value="父类<->设置条件" onclick="openwindow('sun.html','',200,80)"/> </body> </html> sun.html <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>sun.html</title> <script> function set() { var value=document.getElementById('svalue').value; var data = window.opener.assignment(value);//给父类赋值 window.close(); } </script> </head> <body> <input type="text" name="svalue" id="svalue" value="" /> <br/> <br/> <input type="button" name="btn" value="子类<->赋值" onclick="set()"/> </body> </html>
相关文章推荐
- html中子页面给父页面赋值,关闭子页面给父页面传值,父页面条件按子页面设置查询
- OpenJWeb 1.6版本中实现动态设置页面的查询条件列
- OpenJWeb 1.6版本中实现动态设置页面的查询条件列
- Atitit.列表页面and条件查询的实现最佳实践(1)------设置查询条件and提交查询and返回json数据
- Atitit.列表页面and条件查询的实现最佳实践(1)------设置查询条件and提交查询and返回json数据
- js ShowDialogModal 关闭子页面并刷新父页面,保留查询条件
- MyEclipse 设置字体、关闭html,jsp等页面的可视化编辑器
- 页面加载完成后通过查询条件给easyui datagrid赋值,请求两次,并且值不显示问题
- 让Bootstrap的dataTable在重新设置了查询条件后进行不跳转页面ajax刷新
- html(object)控制ie的打印、刷新、另存、关闭、打开、页面设置、属性、打印预览
- HTML页面之间跳转与传值(JS代码)
- html(三)页面基本标签及文本段落的设置
- easyUi弹出window窗口传值与调用父页面的方法,子页面给父页面赋值
- html 页面 title keyworld 的 SEO优化的 基本设置格式
- PB数据窗口datawindow的查询条件设置和执行
- html 设置页面的编码方式
- [HTML]HTML框架IFrame下利用JS在主页面和子页面间传值
- 一个页面有按钮点击出现另一页面,在这个页面有单选关闭这个页面,给第一个页面赋值
- iBatis 操作数据库【设置查询条件】,简单例子之三
- 一个数据库查询方法(可以动态设置查询参数,设置查询条件),很巧妙的组合sql语句