1
0
mirror of https://github.com/quinton-ashley/java2js synced 2024-12-29 10:11:54 +01:00
java2js/index.html
Quinton Ashley 724da27d51 1.2.17
2022-04-30 10:07:11 -05:00

111 lines
2.1 KiB
HTML
Executable File

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<title>java2js demo</title>
<style>
body,
textarea {
display: flex;
background: #000;
color: #eee;
}
textarea {
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
}
.mid {
cursor: pointer;
width: 2vw;
padding: 0.5vw;
background-repeat: repeat-y;
}
img,
p {
width: inherit;
text-align: center;
font-size: 3vh;
margin-top: 1vh;
margin-bottom: 1vh;
}
#javaFile {
width: 48vw;
height: 97vh;
}
#javaConsole {
width: 48vw;
height: 97vh;
float: right;
}
</style>
</head>
<body>
<textarea
id="javaFile"
spellcheck="false"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
placeholder="Create a Java class with a main method here..."
>
package tests;
import java.util.Scanner;
public class ScannerTest {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Hello world!");
System.out.print("What's your name: ");
String name = sc.nextLine();
System.out.println("Hello " + name);
System.out.print("What's your favorite number: ");
int age = sc.nextInt();
System.out.println(age + "? That's my favorite too!");
sc.close();
}
}
</textarea
>
<div class="mid" onclick="location.href = 'https:\/\/github.com/quinton-ashley/java2js';">
<img src="favicon.ico" />
<p>j</p>
<img src="favicon.ico" />
<p>a</p>
<img src="favicon.ico" />
<p>v</p>
<img src="favicon.ico" />
<p>a</p>
<img src="favicon.ico" />
<p>2</p>
<img src="favicon.ico" />
<p>j</p>
<img src="favicon.ico" />
<p>s</p>
<img src="favicon.ico" />
</div>
<textarea
id="javaConsole"
spellcheck="false"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
placeholder="Java console, click here to run!"
></textarea>
<script type="text/javascript" src="jdk.js"></script>
<script type="text/javascript" src="ide.js"></script>
</body>
</html>