简体   繁体   English

基本的仅Java表单按钮

[英]Basic Javascript-only form button

I need to make a very basic button, that when clicked sends a particular person an email letting them know that that particular page has a broken pdf embed. 我需要做一个非常基本的按钮,当单击该按钮时,会向特定的人发送一封电子邮件,让他们知道该特定的页面嵌入了pdf。

In otherwords, the user view a page containing an embeded pdf. 换句话说,用户查看包含嵌入式pdf的页面。 If the pdf is broken, they will click a button. 如果pdf损坏,他们将单击一个按钮。 Someone will get an email saying like "page (insert full page url here) has a broken pdf embed". 有人会收到一封电子邮件,说“页面(在此处插入完整页面的URL)嵌入的pdf损坏”。 I cannot use PHP because this is to be deployed on a non-php server. 我不能使用PHP,因为它将被部署在非PHP服务器上。

Ok so if I use a mailto tag like this: 好吧,如果我使用像这样的mailto标签:

 <p><a href="javascript:void(window.open('mailto:test@example.com?subject=subject&body=body'))">click here</a></p>

How do I get the full url path into the body of the message? 如何获取完整的URL路径到邮件正文中?

这是获取URL并将其传递给mailto的一种方法

<p><a href="javascript:void(window.open('mailto:test@example.com?subject=subject&body='+window.location.href+''))">click here</a></p>

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

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