网页设计外文翻译
《网页设计外文翻译》由会员分享,可在线阅读,更多相关《网页设计外文翻译(14页珍藏版)》请在毕设资料网上搜索。
1、大连交通大学 2013 届本科生毕业设计(论文)外文翻译 1 外文原文 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
2、 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. Whet
3、her 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 HTML comment 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
4、the page without errors. Following is an example of the script and comment tags: 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 t
5、ags 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 box
6、es. 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 th
7、e variable named answer has a value of true and if the answer is Cancel then the variable named answer has a value of false. You can then use an if statement in the JavaScript code to respond appropriately. 大连交通大学 2013 届本科生毕业设计(论文)外文翻译 2 var answer = confirm (Are you sure you want to quit?) if (answ
8、er=true) window.close() 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 b
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中设计图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 网页 设计 外文 翻译
