当我单击外部按钮时,如何通过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?
本文介绍了当我单击外部按钮时,如何通过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
- jQuery UI Dialog
- Fancy Box
- ColorBox
- Lightbox
- 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屋!
查看全文