volare
   做页面预览的时候,数据没有存入数据库,但是要打开一个页面进行预览,询问众大婶,原来是这样来做。

  1、父页面
<input type="text" id="name"  value="zhangsan"/>
<a href="a.html" target="_blank">预览</a>
  2、子页面,也就是a.html获取父页面中文本框的value
$(function(){
    
    console.info(window.opener.document.getElementById("name").value);
});
  这样控制台中出来的则是父页面文本框的值

分类:

技术点:

相关文章:

  • 2021-07-24
  • 2021-11-30
  • 2021-11-27
  • 2021-08-19
  • 2021-12-03
  • 2021-12-25
  • 2021-08-01
猜你喜欢
  • 2022-01-14
  • 2021-04-22
  • 2021-12-03
  • 2021-05-04
  • 2021-09-16
  • 2021-12-14
  • 2021-10-10
  • 2021-05-15
相关资源
相似解决方案