Mootools1.2 tutorial function _ Mootools

Source: Internet
Author: User
Let's talk about the basic knowledge of functions in JavaScript. Today, we will begin lecture 4th in the MooTools series. If you have not read the previous lecture, first check the previous tutorial "Mootools 1.2 tutorial (3) -- Introduction to array usage". Today, we will not talk about MooTools, but about the basic knowledge of functions in JavaScript.
However, to comply with the MooTools topic, you need to know where to use the functions of MooTools. Previously, we put the code in the domready method in all our sample code. When we need to put it out of domready, we use a function ). Before you call a function in domready, the function will not be executed.
In general, a better way is to place your function code somewhere outside the page as much as possible, and then call them through JavaScript applications. When you just write code for fun, it is easier to write everything on a single page. In this tutorial, we use the following conventions:

The Code is as follows:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.