简体   繁体   中英

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.

I'm receiving a URL but it's 'contact.php', where as I want the URL of HTML page

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. In further assistance let me know about the form pop code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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