Mathias Brodala: mailto-Link mit JS & document.write formatieren ?

Beitrag lesen

Hallo Lukas.

Ich habe 2 kleine Fragen zu JavaScript. (Wie) kann ich einen mailto-Link mit JavaScript erstellen?

Entweder, indem du die entsprechende http://de.selfhtml.org/javascript/objekte/string.htm#link@title=Stringmethode oder http://de.selfhtml.org/javascript/objekte/all.htm#inner_html@title=innerHTML oder http://de.selfhtml.org/javascript/objekte/document.htm#create_element@title=createElement und http://de.selfhtml.org/javascript/objekte/node.htm#append_child@title=appendChild nutzt. Bei letzterem kannst du den Attributen direkt ihre Werte zuweisen.

Und wie kann ich ein Ergebnis von document.write formatieren?

Definiere „formatieren“. Wenn es tatsächlich um Optik geht, bietet sich http://de.selfhtml.org/css/@title=CSS an.

Einen schönen Sonntag noch.

Gruß, Mathias

--
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“
[HTML Design Constraints: Logical Markup]