下载此文档

网页设计外文翻译.doc


文档分类:论文 | 页数:约13页 举报非法文档有奖
1/13
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/13 下载此文档
文档列表 文档介绍
网页设计外文翻译
网页设计外文翻译
网页设计外文翻译
外文原文
Source: Web Page Design Using JavaScript
THE BASICSﻭ  JAVASCRIPT uses a subset ofl then the variable named answer has a value of false。 You can then use an if statement in the JavaScript code to respond appropriately.
var answer = confirm ("Are you sure you want to quit?")ﻭif (answer==true)ﻭ{ﻭ
网页设计外文翻译
网页设计外文翻译
网页设计外文翻译
  ()ﻭ}
The following code will pop up a dialog box that asks the user to enter some sort of information. If the user clicks OK the information they entered is stored in the variable。 The second set of quotation marks inside of the prompt statement make the contents of the text box blank when the dialog box is displayed。 
var response = prompt (”What is your name?” ,””)
document。write ("〈font size=7 color=red face=arial〉Hello ” + response + ”!")
Notice that in the last two examples the window and document objects were used。 Window refers to the browser window and document refers to the page being displayed. The use of a dot after the name of the object allows actions to be performed on that object or properties of that object to be modified. In this next example, the navigator object is referenced in order to display the browser name and version.
alert ("You are using " + navigator。appName + " version " + navigator。appVersion + ”.")
POP—UP WINDOWS
An additional browser window may be opened using a simple JavaScript. The open method contains three parts as in the following example: the name of the document or url of the web site to be displayed in the new window, the name that may be used to refer to the browser window (requires more code than is shown here), and the properties of the new window。 Please note that the properties are all listed in one set of quotation marks and are separated by commas.
open ("my", ”mywin", "height=200, width=200, titlebar=false”)
The following properties may be used to control the appearance of the new window:
Table1—1 properties may be used to cont

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

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数13
  • 收藏数0 收藏
  • 顶次数0
  • 上传人gooddoubi
  • 文件大小125 KB
  • 时间2022-04-20
最近更新