All credits to: rabich.de [kleine Änderung by bk]
function beknakst(naam){
var props = "width=500,height=160";
var nf = window.open("", "mailadr", props);
with(nf.document)
{
var at = "@"; var pref = "johnny"; var da = "main.c";
open("text/html");
writeln("<html>\n<head>\n<title>mailadresse</title>");
writeln("</head>\n<body bgcolor='#e1e1e1'>");
writeln("Meine Mailadresse:<br><br>");
writeln("<a href=\"mail" + "to:" + pref + naam + at +
"do" + da + "h\">" + naam + at + "do" + da + "h</a>");
writeln("<br><a href='javascript:self.close()'>Fenster schliessen</a>");
writeln("</body>\n</html>");
close();
}
}
Aufruf (wenn meine Adresse z.B. johnnydepp@domain.ch lautet):
<a href="javascript:beknakst('depp')">email</a>
Teste obiges Beispiel: email