下载此文档

Java外文翻译--使用JavaScript设计网页.doc


文档分类:IT计算机 | 页数:约13页 举报非法文档有奖
1/13
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/13 下载此文档
文档列表 文档介绍
外文原文
Source: Web Page Design Using JavaScript
THE BASICS
JAVASCRIPT uses a subset of the programming language JAVA to provide a high level of interactivity on a web page. JavaScripts are stored within an HTML document and are interpreted by the web browser.
JavaScripts may be located within the HTML code at the point in the page where they are to appear on the screen or they may be written using functions. Functions are small subprograms that are stored between the head tags of an HTML document and are called on to be executed when a particular event occurs.
Whether the script is stored between the head tags or within the body of the HTML document, it must be enclosed in script tags. Also, a set of ment tags are typically used inside the script tags so that older browsers that do not support JavaScript will ignore the script and continue to process the page without errors.
Following is an example of the script ment tags:
<script language="javascript">
<!--
Include JavaScript Code Here
//-->
</script>
Be aware that JavaScript is case sensitive...the difference between a working script and an error message can be one capital letter.
ALERT BOXES
To pop up an alert box include the following line of code inside of script tags in the body of your HTML document. Please note that the processing of the page will stop until the viewer responds to the alert box.
alert ("Place the text to be displayed in the alert box between these quotes.")
Other types of pre-made dialog boxes are available such as the prompt and confirm boxes. In order to take full advantage of the features of these dialog boxes you must write more JavaScript code which can use the values that are returned by the dialog boxes.
The following statements will pop up a dialog box that requires a yes or no answer (OK or Cancel). If the answer is OK then the variable named answer has a value of true and if the answer is Cancel then the variable named answer has a value of false. Yo

Java外文翻译--使用JavaScript设计网页 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数13
  • 收藏数0 收藏
  • 顶次数0
  • 上传人mkt365
  • 文件大小0 KB
  • 时间2013-10-27