当前位置: 首页 > 网络学院 > 客户端脚本教程 > JavaScript > JS 介绍

JavaScript
JS 字符串
JS Date
JS数组,JS Array
JS Boolean
JS Math
JS HTML DOM
JS Browser
JS Cookies
JS 校验
JS Animation
JS Image Maps
JS Timing
JS 建立对象
JS 摘要
JS 实例
JS 对象实例
JS DOM 实例
JS数组对象参考
JS布尔对象参考
JS日期对象参考

JavaScript 中的 JS 介绍


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 1483 ::
收藏到网摘: n/a

JavaScript is used in millions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more.
JavaScript被无数的网页应用于改善设计,验证表单,检测浏览器,创建cookies等。

JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Mozilla, Firefox, Netscape, Opera.
JavaScript是互连网上最被广泛应用的脚本语言,适用于IE,Mozilla,Firefox,Netscape,Opera等众多主流浏览器。


What You Should Already Know
学习基础

Before you continue you should have a basic understanding of the following:
在进一步学习之前你应该先了解下面的这些知识:

  • HTML / XHTML

If you want to study these subjects first, find the tutorials on our Home page.
如果你需要了解上述内容,我们的主页上提供了相应的教程链接。


What is JavaScript?
什么是JavaScript?

  • JavaScript was designed to add interactivity to HTML pages
  • JavaScript为HTML页面提供交互的功能。
  • JavaScript is a scripting language (a scripting language is a lightweight programming language)
  • JavaScript是一种脚本语言(脚本语言是一种低耗程序语言)
  • A JavaScript consists of lines of executable computer code
  • JavaScript是一种有序的计算机代码。
  • A JavaScript is usually embedded directly into HTML pages
  • JavaScript通常直接嵌套在HTML页面中。
  • JavaScript is an interpreted language (means that scripts execute without preliminary compilation)
  • JavaScript是一种诠释性语言(即在执行脚本前无需进行预先编译)。
  • Everyone can use JavaScript without purchasing a license
  • JavaScript是一种公用语言。

Are Java and JavaScript the Same?
Java和JavaScript是否一样?

NO!
不一样!

Java and JavaScript are two completely different languages in both concept and design!
Java和JavaScript无论从概念或是结构来说都是完全不同的两种语言!

Java (developed by Sun Microsystems) is a powerful and much more complex programming language - in the same category as C and C++.
Java(由Sun Microsystems开发)是与C和C++同类的语言,它的功能更强大,结构也更复杂。


What can a JavaScript Do?
JavaScript能做什么?

  • JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages
  • JavaScript为HTML使用者提供了一种程序工具 - HTML使用者一般没有可用的程序,但是几乎所有人都可以在自己的HTML页面放入一小段JacaScript代码,因为它的语法相当的简单。
  • JavaScript can put dynamic text into an HTML page - A JavaScript statement like this: document.write("<h1>" + name + "</h1>") can write a variable text into an HTML page
  • JavaScript可以为HTML页面添加动态内容 - document.write("<h1>" + name + "</h1>")这条JavaScript可以向一个HTML页面写入一个动态的内容。
  • JavaScript can react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element
  • JavaScript可以被事件触发 -  JavaScript可以被设置为当指定事件触发时执行,例如当一个页面加载完成时或是浏览者点击了某个HTML元素。
  • JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element
  • JavaScript可以获取或写入HTML元素 - JavaScript可以获取和修改HTML元素的内容。
  • JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server, this will save the server from extra processing
  • JavaScript可以校验数据 - JavaScript可以在表单提交前对表单数据进行校验,这可以减轻服务器的负担。
  • JavaScript can be used to detect the visitor's browser - A JavaScript can be used to detect the visitor's browser, and - depending on the browser - load another page specifically designed for that browser
  • JavaScript可以检测浏览者的浏览器 - JavaScript可以检测浏览者的浏览器类型并为其加载相应的页面。
  • JavaScript can be used to create cookies - A JavaScript can be used to store and retrieve information on the visitor's computer
  • JavaScript可以创建cookies - JavaScript可以在浏览者的计算机上存储和处理信息。

评论 (7) 1 2 All

登陆 | 还没注册?