Lee Ikard Lee Ikard - 1 year ago 140
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 . . .


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>