使用 jQuery Fancybox 或 Lightbox 显示联系表单
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1556597/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Using jQuery Fancybox or Lightbox to display a contact form
提问by forrest
I would like to use jQuery Fancybox or Lightbox to load a contact form from a standard link in a web page. I have reviewed the documents at http://fancybox.net/examplebut the closest option is the iFrame one and it doesn't work with a standard page link.
我想使用 jQuery Fancybox 或 Lightbox 从网页中的标准链接加载联系表单。我已经查看了http://fancybox.net/example 上的文档,但最接近的选项是 iFrame 并且它不适用于标准页面链接。
My heart is not set on using Fancybox so if there is a better way to have the lightbox effect with a contact form I would appreciate someone pointing me in the right direction.
我的心并不打算使用 Fancybox,所以如果有更好的方法通过联系表格获得灯箱效果,我会很感激有人为我指出正确的方向。
thanks.
谢谢。
回答by helloandre
you'll probably want to look into jquery-ui dialog. it's highly customizable and can be made to work exactly like lightbox/fancybox and supports everything you would need for a contact form from a regular link.
您可能想要查看jquery-ui 对话框。它是高度可定制的,可以像灯箱/花式盒一样工作,并支持您从常规链接获取联系表格所需的一切。
there is even an example with a form.
回答by Kara Duncan
Have a look at: Greybox
看一看:Greybox
It's an awesome version of lightbox that supports forms, external web pages as well as the traditional images and slideshows. It works perfectly from a link on a webpage.
这是一个很棒的灯箱版本,支持表单、外部网页以及传统图像和幻灯片。它可以通过网页上的链接完美运行。
You will find many information on how to use Greybox and also some great examples. Cheers Kara
您会找到许多关于如何使用 Greybox 的信息以及一些很好的示例。干杯卡拉
回答by desbest
Greybox cannot handle forms inside it on its own. It requires a forms plugin. No iframes or external html files needed. Don't forget to download the greybox.css file too as the page misses that bit out.
Greybox 无法自行处理其中的表单。它需要一个表单插件。不需要 iframe 或外部 html 文件。不要忘记下载 greybox.css 文件,因为页面错过了这一点。
Kiss Jquery UI goodbye and a lightbox hello. You can get it here.
Kiss Jquery UI 再见和灯箱你好。 你可以在这里得到它。