Operational Procedures
A web form must check user input inside the browser on Windows, macOS and Linux client PCs. Which script file type should be used?
Show the answer
Correct answerB. .js
AWhy not this: Shell scripts run in a Unix-style shell, not in a browser, and not natively on Windows.
BWhy this is right: JavaScript runs inside the browser, so it works the same on Windows, macOS and Linux.
CWhy not this: VBScript depends on Windows Script Host and is not a cross-platform browser choice.
DWhy not this: Batch files run Command Prompt commands on Windows only and do not run in browsers.
A .js file holds JavaScript, which runs in the web browser on any operating system. The .sh type is tied to Linux and macOS shells and does not run in a browser, so it cannot serve all three client systems.