1.相互获取dom元素

1.1 在父页面获取子页面的dom元素:

  document.getElementById('iframe_id).contentWindow.document.getElementById('domId');

  //先获取iframe的Id,再在iframe所在的document找dom元素,根据id查找;

1.2 子页面获取父页面的dom元素

  window.parent.document.getElementById('mask_id'); //window.parent可以回到父页面