Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 1.17 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.     <head>
  5.         <title>MooTools Recipes</title>
  6.         <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  7.         <script type="text/javascript" src="mootools-1.3.0.js"></script>
  8.     </head>
  9.     <body>
  10.         <noscript>Your Browser has JavaScript Disabled.
  11.             Please use industry best practices for coding
  12.             in JavaScript; letting users know they are missing
  13.             out is crucial!</noscript>
  14.         <script type="text/javascript">
  15.             // best practice: ALWAYS include a NOSCRIPT tag!
  16.             var mooversion = MooTools.version;
  17.             var msg = 'version: '+mooversion;
  18.             document.write(msg);
  19.             // just for fun:
  20.             var question = 'Use MooTools version
  21.             '+msg+'?';
  22.             var yes = 'It is as you have requested!';
  23.             var no = "Please change the mootools source attribute
  24.             in HTML->head->script.";
  25.             // give 'em ham
  26.             alert((confirm(question)?yes:no));
  27.         </script>
  28.     </body>
  29. </html>