
Untitled
By: a guest on
May 9th, 2012 | syntax:
None | size: 1.17 KB | hits: 17 | expires: Never
<!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>
<title>MooTools Recipes</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="mootools-1.3.0.js"></script>
</head>
<body>
<noscript>Your Browser has JavaScript Disabled.
Please use industry best practices for coding
in JavaScript; letting users know they are missing
out is crucial!</noscript>
<script type="text/javascript">
// best practice: ALWAYS include a NOSCRIPT tag!
var mooversion = MooTools.version;
var msg = 'version: '+mooversion;
document.write(msg);
// just for fun:
var question = 'Use MooTools version
'+msg+'?';
var yes = 'It is as you have requested!';
var no = "Please change the mootools source attribute
in HTML->head->script.";
// give 'em ham
alert((confirm(question)?yes:no));
</script>
</body>
</html>