The only languages I have ever seen supported by web browsers in <script>
elements are:
- JavaScript / JScript (which is ubiquitous)
- VBScript (IE 10 and lower only)
- PerlScript (IE with a plugin from ActiveState only)
- Dart (in a nonstandard build of Chromium) which is not intended for production use.
The HTML 4 specification gives examples of Tcl, but I've never heard of a browser that implemented this.
In any practical sense (for WWW development), JavaScript is the only (not really a) choice.
There are also various languages (e.g. Dart, TypeScript, ES6/7) which have translators to convert programs to (ES5 flavoured) JavaScript which can then run in browsers.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…