简体   繁体   English

在联系表单中传递当前页面的URL和标题

[英]Pass current page URL and Title in contact form

I've implemented 'Simplemodal Contact Form(SMCF)', when form pops up and user send message to my mail, I want to automatically include a link to the page they are on and title of the particular page in the email, but I'm having trouble figuring out how to grab the url for the page they are on. 我已经实现了“简单模式联系表单(SMCF)”,当表单弹出并且用户向我的邮件发送消息时,我想自动在其电子邮件中包含指向其所在页面的链接以及特定页面的标题,但是我在弄清楚如何获取他们所在页面的URL时遇到了麻烦。

I'm receiving a URL but it's 'contact.php', where as I want the URL of HTML page 我收到一个URL,但是它是“ contact.php”,在这里我想要HTML页面的URL

Can anyone help me out on this? 有人可以帮我吗? Also Please let me know if you need further clarification. 也请让我知道是否需要进一步说明。

Thanks in advance. 提前致谢。

Hi you can get the url of the current page as 嗨,您可以获取当前页面的网址为

document.URL

You can get the url from the main page and before calling the pop, pass it as a parameter to the pop function javascript. 您可以从主页获取url,然后在调用pop之前,将其作为参数传递给pop函数javascript。 In further assistance let me know about the form pop code. 在进一步的帮助下,让我知道表单弹出代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM