|
Post by pefaha on Dec 4, 2023 5:20:37 GMT
JavaScript 引擎 JavaScript 引擎只是一个能够执行用 JavaScript 语言编写的代码的计算机程序。最初,这些引擎只是表演者。但今天它们已经进化,现在可以动态或运行时编译。大多数现代 Web 浏览器必然使用 JavaScript 引擎来提高其性能。没有 JavaScript 引擎的浏览器几乎都消失了。 客户端 JavaScript 当我们谈论客户端 JavaScript 时,我们指的是 JavaScript 脚本在浏览器上的工 国家电子邮件列表 作方式。通常,JavaScript 引擎直接在浏览器代码中找到。市场上的主要网络浏览器(Chrome、Firefox、Microsoft Edge、Brave、Safari 等)都有自己的集成 JavaScript 引擎。Web 程序员使用与事件关联的函数编写 JavaScript 代码。JavaScript 中的函数通常会对 HTML 和 CSS 代码进行一些更改。 为了帮助您更好地理解客户端 JavaScript,以下是其工作原理的分步概述: ; 在加载过程中将页面及其所有内容(按钮、下拉列表、标签等)转换为称为 DOM(文档对象模型)的数据结构; 引擎将 JavaScript 代码转换为字节码,字节码充当机器和 JavaScript 语法之间的中介; JavaScript引擎对字节码的解释以及DOM的修改; 浏览器显示新的 DOM。 这一系列事件就是客户端 JavaScript 的工作原理。如果没有它,一些包含 JavaScript 代码片段的网站将无法正确显示。 服务器端 JavaScript 服务器端 JavaScript 语言 服务器端 JavaScript 是指如何在后端服务器上下文中使用脚本。对于服务器端 JavaScript,引擎始终位于本地或远程服务器上。有一个服务器级 JavaScript 函数能够直接访问数据库以执行某些特定操作。此功能还允许您对客户端或服务器上安装的操作系统(操作系统)触发的事件做出反应。
|
|