SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
May 22, 2007, 17:22 #1
- Join Date
- May 2004
- Location
- Sydney
- Posts
- 49
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Mailto: function with class... do-able??
Hi there,
I found this code:
<script language="JavaScript">
<!--
document.write ("<a href='mailto:?subject=Divine gift wrapping made easy!&body=%20"+location.href+"'>Here</a>")
// -->
</script>
Just wondering if it's possible to add class="bot" to the link to keep my formatting consistant... I've tried it all over the place, but no joy
Many thanks!
-
May 23, 2007, 09:23 #2
- Join Date
- May 2007
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You either need to escape your double quotes or use single quotes.
Escaping: class=\"bot\"
or
Single: class='bot'
Code:<script language="JavaScript"> <!-- document.write ("<a class='bot' href='mailto:?subject=Divine gift wrapping made easy!&body=%20"+location.href+"'>Here</a>") // --> </script>
Bookmarks