iframe子页怎么获取父页的window对象
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iframe子页怎么获取父页的window对象相关的知识,希望对你有一定的参考价值。
参考技术A 1、父页面中的iframe复制代码 代码如下:
<iframe name="parentPage"></iframe>
2、子页面中元素的属性
复制代码 代码如下:
<input type="text" id="date" data-dojo-type="dijit/form/DateTextBox" value="2013-11-12"/>
3、取子页面中DateTextBox中值
复制代码 代码如下:
var statisDate = window.frames["parentPage"].document.getElementById('date').value;本回答被提问者和网友采纳
WordPress父页和子页摘录
Snippet for a parent page to list child pages with excerpts.
<div class="entry-content entry"> <?php the_content(); ?> </div><!-- .entry-content --> <!-- list child-pages with links and excerpt --> <?php global $post; ?> <?php if ( $pages ) : ?> <?php $inner_query = new WP_Query("post_type=page&posts_per_page=-1&post_parent={$id}&orderby=menu_order&order=ASC"); while ($inner_query->have_posts()) : $inner_query->the_post(); ?> <h2 class="children-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> <?php endwhile; endif; ?> <?php wp_reset_query(); ?>
以上是关于iframe子页怎么获取父页的window对象的主要内容,如果未能解决你的问题,请参考以下文章