Lee Ikard Lee Ikard - 2 years ago 209
HTML Question

Javascript add date and time to mailto subject link

I want to put the current date and time into the subject of a

Here's my code so far:

(I can't paste my code for some reason. Ill use pastebin)
How, in javascript, can I find the
subject =
line and add to that?

var d = new Date(86400000);
document.getElementById("demo").innerHTML = d;

Problem? <a href="mailto:leeeyecard@gmail.com?subject=ServerError">Click!</a>
<div id="timedowndiv">
<p>Redirecting in 3 seconds . . .

Answer Source

Why not use sth similar to,

<a href="javascript:var date = new Date(); window.open('mailto:test@example.com?subject='+date +'&body=body');">test</a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download