当我单击外部按钮时,如何通过jquery创建到外部页面的弹出窗口并从其获取值到父页面? [英] How can I create popup window by jquery to external page and get a value from it to the parent page when I click a button there?

查看:117
本文介绍了当我单击外部按钮时,如何通过jquery创建到外部页面的弹出窗口并从其获取值到父页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过jquery创建包含窗体的外部页面的弹出窗口,并在单击该按钮时从该外部页面到父页面获取值?

How can I create popup window by jquery to external page that contain a form and get a value from that external page to the parent page when I click a button there?

推荐答案

有许多适合您的插件.所以看看

There are lot of plugins for you. So have a look

  1. jQuery UI对话框
  2. 花式盒子
  3. ColorBox
  4. 灯箱
  5. Thickbox-已过时
  1. jQuery UI Dialog
  2. Fancy Box
  3. ColorBox
  4. Lightbox
  5. Thickbox - outdated

为了从弹出窗口中获取一个值给孩子

In order to get a value from popup to child

在父页面中

  function SetPopUpData(val){

   //your logic here
  }

在弹出页面中

 function SendDataToParent(){
  var data='some value';

  window.parent.SetPopUpData(data); // this will call the parent page's function
 }

这篇关于当我单击外部按钮时,如何通过jquery创建到外部页面的弹出窗口并从其获取值到父页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆