Javascript can be cross-platform. The JavaScript script language does not depend on the operating system and only requires browser support; JavaScript has been supported by most browsers, so it can run on multiple platforms (such as Windows, Linux, Mac, Android, iOS, etc.).
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
javascript can be cross-platform.
JavaScript ("JS" for short) is a lightweight, interpreted or just-in-time compiled programming language with function priority. Although it is famous as a scripting language for developing Web pages, it is also used in many non-browser environments. JavaScript is a dynamic scripting language based on prototype programming, multi-paradigm, and supports object-oriented, imperative and declarative (such as functional programming) style.
The cross-platform nature of JavaScript script language:
The JavaScript script language does not depend on the operating system and only requires browser support. Therefore, a JavaScript script can be used on any machine after being written, provided that the browser on the machine supports the JavaScript script language. JavaScript has been supported by most browsers, so it can run on a variety of platforms (such as Windows, Linux, Mac, Android, iOS, etc.).
Unlike server-side scripting languages, such as PHP and ASP, JavaScript is mainly used as a client-side scripting language to run on the user's browser and does not require server support. Therefore, in the early days, programmers preferred JavaScript to reduce the burden on the server, but at the same time it also brought about another problem, security.
As servers become more powerful, although programmers prefer scripts running on the server to ensure security, JavaScript is still popular for its cross-platform and easy-to-use advantages. At the same time, some special functions (such as AJAX) must rely on JavaScript to be supported on the client side.
[Related recommendations: javascript learning tutorial]
The above is the detailed content of Can javascript be cross-platform?. For more information, please follow other related articles on the PHP Chinese website!