O
O
Oskar2021-10-08 13:02:14
Java
Oskar, 2021-10-08 13:02:14

Is it possible to use java instead of javascript to add interactivity to web pages?

Is it possible to use java instead of javascript to add interactivity to web pages?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
Sergey Gornostaev, 2021-10-08
@Askat12345

No.

A
alexalexes, 2021-10-08
@alexalexes

The html layout standard does not prohibit the use of any other programming language other than js.

<script type="text/ваш-язык-программирования"></script>

Only bad luck, except for the browser, such a solution requires the installation of a runtime module in the OS - be it java or silverlight, or something else.
As a rule, a typical user does not have such a piano in the bushes, he only has a browser and does not care if there are any specific modules in the OS, he wants to see your site exclusively using a browser.
So, just javascript.

O
Orkhan, 2021-10-08
Hasanly @azerphoenix

If we are talking about a normal project, then no.
The web is based on 3 languages ​​- html, css, js.
java, python, php, typescript, ruby ​​are only server-side languages ​​(in this context). Older browsers can run applets, but they are not supported in newer ones.
The only solution is to write Java code that is later transpiled into JavaScript. This was already mentioned by a colleague - Vamp

T
tundramani, 2021-10-09
@tundramani

you can write a java virtual machine in js
and run pure java code

W
wisgest, 2021-10-08
@wisgest

If completely without JS, then, as far as I understand, interactivity is possible only inside the applet .

V
Vladimir, 2021-10-08
@BugorSA

I don’t know if this is a topic, but there is such an old thing as GWT (Google Web Toolkit). There is also a Java -> JavaScript compiler, but the analogues above are better, IMHO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question