Created
February 19, 2017 12:41
-
-
Save pleabargain/3f431c90fa396e65cbf25816e4e1c75d to your computer and use it in GitHub Desktop.
html and js to include doc url in mailto:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
<html> | |
<head> | |
<title>JavaScript mailto Attribute</title> | |
<script type="text/javascript"> | |
let email=('[email protected]'); | |
let x = document.URL; | |
let subject = ('My Feedback' + x); | |
let cc = ('[email protected]'); | |
let bcc = ('[email protected]'); | |
let body = ('I am the body of the feedback that you are sending, note the subject line is getting the doc URL. Created using JavaScript.'); | |
document.write('<a href="mailto:' + email + | |
'?subject=' +subject+ | |
'&cc=' +cc+ | |
'&bcc=' +bcc+ | |
'&body=' +body+ | |
'">' + 'Click here to send feedback about this page' + '<'+'/a>'); | |
</script> | |
</head> | |
<body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment