Forum Moderators: open
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<script type="text/javascript">
var subj = encodeURI("Have a look at this:- " + window.location.href);
var body = encodeURI("You might find this interesting:- ") + "%0A%0A" + encodeURI(window.location.href);
document.write("<a href=\"mailto:?subject=" + subj + "&body=" + body + "\">Send link to a friend</a>");
</script>
<noscript>You do not have Javascript enabled so you cannot send the message.</noscript>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<div>
Some words
<br /><br />
<script type="text/javascript" src="scripts/script_a.js"></script>
<noscript>You do not have JavaScript enabled so you cannot send the message.</noscript>
<br /><br />
Some words
</div>
</body>
</html>
<!--
var subj = encodeURI("Have a look at this:- " + window.location.href);
var body = encodeURI("You might find this interesting:- ") + "%0A%0A" + encodeURI(window.location.href);
document.write("<a href=\"mailto:?subject=" + subj + "&body=" + body + "\">Send link to a friend</a>");
//-->
Don't include HTML comments <!-- --> in JavaScript.
.no-js .js-required {
display: block;
}
.js-required {
display: none;
}
<div class="js-required">
You do not have JavaScript enabled so you cannot send the message.
</div>
var subj = encodeURI("Have a look at this:- " + window.location.href);
var body = encodeURI("You might find this interesting:- ") + "%0A%0A" + encodeURI(window.location.href);
document.write("<a href=\"mailto:?subject=" + subj + "&body=" + body + "\">Send link to a friend</a>");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<div>
<script type="text/javascript" src="myscript.js"></script>
<noscript>You do not have JavaScript enabled so you cannot send the message.</noscript>
</div>
</body>
</html>