thinkcmf中使用iframe
来源:互联网 发布:mac usr local 编辑:程序博客网 时间:2024/05/14 22:06
实现效果:
点击查找会员
弹出框框
选中会员,在会员ID框中显示会员ID
--------------------------------------------------代码实现详解-------------------------------------------------------------
父页:father.html
<div id="tess" style="display: none;" class="ifr1"> <div id="ifrtable" class="ifrtab"> 会员列表 <div onclick="win_close()" id="popWinClose" class="ifrclo"> </div> </div> <iframe name="iframeSon" id="ifr" width="800" height="548" frameborder="0" scrolling="auto" src="子页存在的页面"> </iframe></div>
<script> function show_id(id) {//接受从子页传过来的id,填充到表单“会员ID”这个字段 $("#user_id").val(id); } function show_ifr() {//显示父页中的iframe $("#tess").css("display","block"); } function win_close() {//隐藏父页中的ifram $("#tess").css("display","none"); }</script>
主要是显示内容以及一个函数:
选中该单选框,触发show_user()函数
<td id="cheid"><input type="radio" name="ids" value="{$vo.id}" onclick="show_user({$vo.id})" ></td>
<script> function show_user(id) {//调用父页中的函数,传id过去 parent.show_id(id); }</script>
----------------------------------tip--------------------------
附送一个小技巧,用一下这个方法,可以直接从父页获取子页中单选框中被选中的值
function user_radio() { var che = window.frames["iframeSon"].window.$('#cheid input[name="ids"]:checked '); return che; }
0 0
- thinkcmf中使用iframe
- thinkcmf-使用笔记
- ThinkCMF框架使用
- Thinkcmf
- thinkcmf
- thinkcmf
- ThinkCMF中如何实现ajax异步加载
- iframe中使用jquery查找
- iframe 中使用 window.name
- artDialog v6 中iframe使用
- iframe中使用history.back
- 在iframe中使用带iframe的日历组件
- 在Extjs中使用iframe以及手动刷新iframe
- tapestry中使用iframe(和frame不同)
- tapestry中使用iframe(和frame不同)
- html页面中iframe的使用
- ExtJs中如何灵活使用Iframe!
- HTML中IFRAME标签的使用
- 内存泄漏
- 什么是Java的抽象类
- js格式化数字(金额--每隔三位加逗号)
- sass笔记-1|Sass是如何帮你又快又好地搞定CSS的
- 十四章
- thinkcmf中使用iframe
- R语言的数据类型和对象类型
- tornado协程(coroutine)
- mesos - 运维的革命
- 学习C++Primer第五版,课后练习。
- 常用集合之间的区别
- springmvc 配置jdbc 使用DruidDataSource
- 根据包名判断是否存在某个应用
- 14章 上机