MooTools学习笔记——0101 Downloading and Installing the MooTools Core


  1. Go to the MooTools download page located at http://mootools.net/download/version/1.2.6, you will see three options, choose the Uncompress option.

MooTools学习笔记——0101 Downloading and Installing the MooTools Core_第1张图片

 

2. Create an HTML doument:index.html

MooTools学习笔记——0101 Downloading and Installing the MooTools Core_第2张图片

 

3. Install MooTools by referencing it in the <head> of your HTML document with the following code:

<script type="text/javascript" src="mootools-1.2.6-core-nc.js"></script>

  

Right below the MooTools script reference,  place the following block of code:

<script type="text/javascript">
 window.addEvent("domready", function() {
  alert("Hello World.");
 });
</script>

  

4. Test your code by opening your document HTML in your favorite web browser.
MooTools学习笔记——0101 Downloading and Installing the MooTools Core_第3张图片
 

 For your reference, your HTML markup should look similar to the following:

<!DOCTYPE HTML>
<html>
<meta charset="GBK">
<head>
<script type="text/javascript" src="mootools-1.2.6-core-nc.js"></script>
<script type="text/javascript">
	window.addEvent("domready", function() {
		alert("Hello World.");
	});
</script>
<title>Installing MooTools</title>
</head>
<body>
</body>
</html>

 

你可能感兴趣的:(MooTools学习笔记)