[英]Include Timestamp in mailto: subject
我想在郵件主題中包含時間戳。 我已經發現我必須為此使用 javascript,我還找到了一種包含它的方法,但是我無法在網頁上顯示郵件地址(沒有顯示)。 下面是我寫到現在的代碼。 我認為這與我在 javascript 中包含 html 的方式有關,但我找不到我的錯誤。
<script>
Document.write('<a href="mailto:example@example.de?subject=This is my subject' + new (Date().getTime())+'">example@example.de</a>);
</script>
我使用的代碼片段是這個:
document.write('<a href="mailto:foo@bar.com?subject=email_' + new (Date().getTime()) + '"></a>');
一個可能的解決方案可以是:
'<a href="mailto:foo@bar.com?subject=email_' + Date.parse(Date()) + '"></a>'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.