script>
Episode 2
VI 5:
At this part, you must first show your mice to this colorful color.
Connect the surface, see what results in the statue column under the browser. Then there will be the function of us.
Combined with JavaScript. Ok, now move your mice to the contained end of the contours.
Face, you should send an existing window, is it? ! how is it! How do you do it? Below
This connection method:
In this child, you just have to join in the label of the community.
ONMOUSEOVER's Method can achieve you
Effect. Window.status this is used to make you display on the status column of the WWW browser.
Some messages are used. In the language, you can see that the message division is the part of 'enclosed, not "including
From the end of the message part, it must be added; Return True.
Ok, use the characteristics of the above, it can be made in a simple amount of the second consecutive set! The same is simple,
OnMouseOver's Method, after the matching event, go to call the function hello (), no longer
More addressed, the law is as follows:
Function Hello () {
Alert ("Haro!");
}
script>
hEAD>
body>
html>
TE Example 6:
Next, I have to tell you an example of an example of a date and time. In the first part, you have seen it.
Lawmodified usage and method of making. Now I want to tell you that it is not a servo or file on the network.
Modify the date of repair, but your own home machine's day and time. By the following is the results:
script>
The law is as follows:
Document.write ("The current time is:", today.gethai (), ":", today.getminutes ())
Document.write ("
Today:", today.getMonth () 1, "/", today.getdate (), "/", today.getyear ());
// end hiding contents ->
script>
In this example, we must first build a day-to-day change, which can be
Today = new date () is over.
If there is no special specification and date, the browser will use the time between the local customer machine machine, if
It puts a variable Today. What you have to pay attention to this is: I have no declaring of today's variation.
This and Java or other programs must first add the way to the declaration of the declaration before use.
with. After completing the revival of Today, we are waiting to establish an item with local time and the Japanese period.
(Object). The time and date of the Today this item can be taken with Get ...
Please note that getMonth This Method is obtained by 0 ~ 11, and must add 1
Table is genuine from January to December. After reading the examples, I want you to make your file a bit.
Zhihui, such as: If a file has time-effective limit, you can use our example 4 in the previous one.
The functions mentioned in the presentation and the functions learned in this model, set a document on the 10th day
After reading, I will tell the reader: "Hey! This is outdated!" The program, try to see, it is not difficult!
In addition to the above-acting, you can set the date the date is as follows:
Docstarted = new date (96, 0, 13)
The first year is the year (Western Yuan), and it is a month (but remember 1), and then it is the day. The same method can also be
Plus the time setting, as below:
Docstarted = New Date (96, 0, 13, 10, 50, 0)
The top three is the year, month, day, and then the time, minute, seconds. At the end, we must wish you,
JavaScript does not have an actual date of date, but it can show a day and time without cost.
The reason is that it is from 1/1/1970 0: 0H to count the time in MS (Milli Seconds), which sounds like some complex, but you don't have to worry, it has a standard shared function to calculate,
You just know how to use it!
Example 7:
Next, we have to introduce a function of generating chaos, and is also written in JavaScript.
This function just uses a little skill, and this skill is in large partial compilers (Compiler).
Both are as follows (or similar) calculations. I believe that JavaScript should also be similar to the same party.
Method to produce this Method, if it will provide this function. Under the result of this function:
This is a mess-of-in-law:
script>
Under the way it is this method of writing:
Function randomnumber () {
Today = new date ();
Num = math.abs (Math.Sin (Today.gettime ()));
Return Num;
}
script>
hEAD>
Document.write ("this is a random number:", randomnumber ());
// ->
script>
body>
html>
Our doing method is the time function in the previous example; it will now have a big number,
Use this number to add to the calculation! For example: take it to make a string function (SIN)
Calculated, the number got will be the calculation of the absolute value, resulting in a result of 0 and 1
Real number. Because the change in time is MS as a single bit, and you will never get the same number.
However, this way is not suitable for coming to quickly and continued to produce a series of mess, but if you are
It is not fixed, I have been used once a long time, that effect is not wrong!
VI 8:
One important feature of JavaScript is that it can make a window. You can produce a window of one, and
In this window, the HTML file is loaded, completely with JavaScript to the Internet.
The way the next example is to tell you where to start a window and write some east west to go, you can try it first.
The original step is as follows:
Function Winopen () {
Msg = Open ("", "DisplayWindow", "Toolbar = NO, Directories = NO, MENUBAR = NO");
Msg.document.write ("
Msg.document.write ("
}
script>
hEAD>