4.1Web Scripting(web脚本语言)

A web browser provides an ECMAScript host environment for client-side computation including, for instance, objects that represent windows, menus, pop-ups, dialog boxes, text areas, anchors, frames, history, cookies, and input/output. Further, the host environment provides a means to attach scripting code to events such as change of focus, page and image loading, unloading, error and abort, selection, form submission, and mouse actions. Scripting code appears within the HTML and the displayed page is a combination of user interface elements and fixed and computed text and images. The scripting code is reactive to user interaction, and there is no need for a main program.

web浏览器提供了一个ECMAScript宿主环境来实现客户端的计算,例如:以windows,menus,pop-ups,dialog boxes,text areas,anchors,frames,history,cookies以及输入/输出为代表的对象。更多地,这个宿主环境提供一种方式用脚本代码操作诸如焦点改变,页面和图片加载、卸载,错误和和放弃,选择,表单提交和鼠标动作等事件。脚本代码出现在HTML里面,显示出来的页面是一个用户接口元素与固定的和计算出来的文本和图片的集合。脚本代码根据用户的交互而做出反应,并不需要存在一个主程序。

A web server provides a different host environment for server-side computation including objects representing requests, clients, and files; and mechanisms to lock and share data. By using browser-side and server-side scripting together, it is possible to distribute computation between the client and server while providing a customized user interface for a Web-based application.

一个web服务器提供了不同的宿主环境来完成服务器端的计算,包括requests, clients, and files等为代表的对象以及数据锁定和分享机制。通过同时使用浏览器段和服务器端的脚本,当为一个基于web的应用程序提供定制化的用户接口是就可以在服务端和客服端之间分布计算。

Each Web browser and server that supports ECMAScript supplies its own host environment, completing the ECMAScript execution environment.

每个支持ECMAScrpit的web浏览器和服务器提供了他们自身的宿主环境来完善ECMAScript执行环境。

你可能感兴趣的:(4.1Web Scripting(web脚本语言))