Share with me the process of learning js author aircy javascript learning tutorial page 1/3

Source: Internet
Author: User

Preface:
I have never finished learning a JS book since I got started with JavaScript. From today on, I will learn, organize, and share the js Code in my learning process.
The code that will be released in the future does not mean that it is completely original. On the contrary, many parts will be originated from the Internet, and of course there will be no less worry-free scripts. I hope you will not try it after reading it.
Reprimand on the Forum. After all, "Indecent "! It is published here to share it with friends who used to be the same as me or who are learning the front line. At the same time, I
I also hope that more people will be supported here. If you have any suggestions or comments, please follow up more. Join us! Thanks!

Instance 1,
This example describes the simple applications of navigator, cookie, screen, location object, function call, prompt, alert, and confirm interaction.
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> click me </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Example 2,
This example describes the simple application of event objects and events.
<Html> <pead> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "> <title> mouse </title> </pead> <body onMouseMove =" GetPosition (); "> press the mouse in the text box: <input type = "text" name = "textfield" onMouseDown = "alert ('Press the mouse in the textbox ')"> press the keyboard: <input type = "text" name = "textfield" onKeyDown = "alert ('Press the keyboard ');"> event object: <input type = "text" name = "textfield" id = "text" onClick = "catchEvent (); "> <input type =" submit "name =" Submit "value =" submit "id =" button "onClick =" catchEvent (); "> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Instance 3,
This example describes how to use arrays and Their slice () methods.
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta name = "Generator "CONTENT =" EditPlus "> <meta name =" Author "CONTENT =" "> <meta name =" Keywords "CONTENT =" "> <meta name =" Description "CONTENT = ""> </HEAD> <BODY> array and its slice () use method </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Example 4,
This example describes how to use objects and constructor methods.
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <meta name = "Generator "CONTENT =" EditPlus "> <meta name =" Author "CONTENT =" "> <meta name =" Keywords "CONTENT =" "> <meta name =" Description "CONTENT = ""> </HEAD> <body> Use of constructor </body> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Instance 5 (4.1 ),
This example describes how to use a Document Object.
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Instance 6 (4.2 ),
This example describes how to use a Document Object to read form elements.
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Instance 7 (4.3 ),
This example describes how to use a Document Object to read form elements, a registration verification code.
<Html> <pead> <title> User Registration </title> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "> <style type =" text/css "> </style> </pead> <body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Related Article

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.