JavaScript_A Beginner's Guide - Introduction to JavaScript - 09/19/2012
来源:互联网 发布:数控加工及编程题库 编辑:程序博客网 时间:2024/05/17 03:04
Of course, you can build a Web page by using only HTML, but JavaScript allows you to add additional features that a static page of HTML can’t provide without some sort of scripting or programming help.
JScript is the version of JavaScript that Microsoft Internet Explorer uses (which has additional features because it is implemented as a Windows Script engine; it can use server side languages to perform more complex tasks like updating databases).
ECMAScript is the international standard name and specification for the JavaScript language, so it’s not a new language but a standard that is set for JavaScript and JScript
JavaScript and Java are two different languages. Java is a full programming language that must be compiled (running a program through software that converts the higher-level code to machine language) before a program (often called a Java applet) can be executed. Java is more powerful but also more complex.JavaScript is an object-based, client-side scripting language that you can use to make Web pages more dynamic.
Object based means that JavaScript can use items called objects. However, the objects are not class based (meaning no distinction is made between a class and an instance); instead, they are just general objects.
Client side means that JavaScript runs in the client (software) that the viewer is using, rather than on the Web server of the site serving the page. In this case, the client would be a Web browser. With a client-side language, the browser reads and interprets the code, and the results can be given to the viewer without getting information from the server first. This process can make certain tasks run more quickly
JavaScript can also be used to check the information entered into a form before the form is sent to a server-side program to be processed. This information check can prevent strain on the Web server by preventing submissions with inaccurate or incomplete information. Rather than running the program on the server until the information is correct, that data can be sent to the server just once with correct information.
A scripting language doesn’t require a program to be compiled before it is run. All the interpretation is done on-the-fly by the client.
JavaScript runs in the browser by being added into an existing HTML document (either directly or by referring to an external script file). You can add special tags and commands to the HTML code that will tell the browser that it needs to run a script. Once the browser sees these special tags, it interprets the JavaScript commands and will do what you have directed it to do with your code. Thus, by simply editing an HTML document, you can begin using JavaScript on your Web pages and see the results.
To find additional information online to help you with JavaScript, here are some useful resources:
● A place to find tutorials with working examples of the results: www.pageresource.com/jscript
● An excellent tutorial site that includes cut-and-paste scripts: www.javascriptkit.com
● Video series: http://channel9.msdn.com/Series/Javascript-Fundamentals-Development-for-Absolute-Beginners
First JavaScript program
<html> <body> <script type="text/javascript"> document.write("This text was written with JavaScript!"); </script> </body></html>
- JavaScript_A Beginner's Guide - Introduction to JavaScript - 09/19/2012
- JavaScript_A Beginner's Guide - Understanding variables - 09/21/2012
- JavaScript_A Beginner's Guide - Understanding Functions - 09/22/2012
- JavaScript_A Beginner's Guide - Using an external JavaScript file - 09/20/2012
- JavaScript_A Beginner's Guide - Conditional Statements and Loops - 09/23/2012
- A Beginner's Introduction to POE
- A Beginner's Guide to Pointers
- Absolute Beginner's Guide to Project Management
- Beginner's Guide To ASP.NET Cookies
- A Beginner's Guide To btrfs
- A Beginner’s Guide to LibCurl
- Nginx: Beginner’s Guide
- A Beginner's Guide to Creating a MMORPG
- A Beginner's Guide to Creating a MMORPG
- 指针入门指导 -- A Beginner's guide to Pointers
- A beginner's guide to search engine optimization and promotion
- Absolute Beginner's Guide to eBay (4th Edition)
- The Beginner's Guide to Broadband and Wireless Internet
- c++ study
- C程序设计语言整理笔记(二)类型,运算符与表达式
- shell学习
- 后台注册信息的jdbc代码
- window的INI文件操作
- JavaScript_A Beginner's Guide - Introduction to JavaScript - 09/19/2012
- 11级_Java_曹建波 09.19 反射
- 解决:Disk /dev/sdb doesn't contain a valid partition table
- HDU 1042 与1050类似,每个整形保存几位,然后整个拼凑起来
- 如何查看yum安装的软件路径
- linux下线程同步
- poj 1422 Air Raid
- JAVA单例模式详解
- [uva] 10215 - The Largest/Smallest Box ...