0

Can i write java in a the body/head of a html file instead of javascript? Or are they the same thing?,

7th Aug 2017, 10:05 PM
Frans
5 Answers
+ 2
the quote I like that sums it up is: "Java is to JavaScript like Car is to Carpet" Although JavaScript can be run on the server too (Node.js), it's always been more commonly used to make websites interactive. That means that web browsers are able to run JavaScript themselves. You can code up a site with html, css and JavaScript, open up the html file inside a browser and everything will run. No server needed and you don't even have to be connected to the internet (unless you're linking to jQuery or something) Java on the other hand can only be run on a server. A web browser would have no idea what to do with it. so for web applications, the server runs all the Java code and creates the html,css,JavaScript files that it hands off to the browser.
8th Aug 2017, 12:48 AM
Chris Ulanowicz
Chris Ulanowicz - avatar
+ 3
Java and javascript are different. You can use javascript inside the script tag.
7th Aug 2017, 11:31 PM
James Cooke
0
where do i write java? @james
7th Aug 2017, 10:34 PM
Frans
0
sry, im new of this but can i "connect java" to a website or is it just for a program? @james
7th Aug 2017, 10:37 PM
Frans
0
So java and js is the same thing (how you code it) @james
7th Aug 2017, 10:40 PM
Frans