Ive tried to download sum programs.. written in java.. but than i realized i dont know how to open them or work with it.. so ive just got a javascript..
what shud i do with it? and how shud i open it?
Help wud be appreciated

Code: Select all
<html>
<head>
<title></title>
<--script language="javascript"> #had to comment this out
function mouseMove(e)
{
var x = (navigator.appName == 'Netscape')? e.pageX :
event.x+document.body.scrollLeft;
var y = (navigator.appName == 'Netscape')? e.pageY :
event.y+document.body.scrollTop;
if(navigator.appName == 'Netscape' && e.target!=document)
routeEvent(e);
Clip(Hidden, 0, y + 10, WindowWidth(), 60);
return(true);
}
function Clip(layer, x, y, w, h)
{
if(navigator.appName == 'Netscape')
{
if(parseInt(navigator.appVersion) == 5)
{
layer.style.clip =
'rect(' + y + ' ' + (x + w) + ' ' + (y + h) + ' ' + x + ')';
}
if(parseInt(navigator.appVersion) == 4)
{
layer.clip.left = x;
layer.clip.top = y;
layer.clip.right = x + w;
layer.clip.bottom = y + h;
}
}
else
{
layer.style.clip =
'rect(' + y + ' ' + (x + w) + ' ' + (y + h) + ' ' + x + ')';
}
}
function GetLayer(layer)
{
var ReturnLayer = null;
if(navigator.appName == 'Netscape')
{
if(parseInt(navigator.appVersion) == 5)
ReturnLayer = document.getElementById(layer);
else
eval('ReturnLayer = document.' + layer + ';');
}
else
{
eval('ReturnLayer = document.all.' + layer + ';');
}
return ReturnLayer;
}
function WindowWidth()
{
if(navigator.appName == 'Netscape')
return window.innerWidth;
else
return document.body.clientWidth;
}
function init()
{
document.onmousemove = mouseMove;
if(navigator.appName == 'Netscape')
document.captureEvents(Event.MOUSEMOVE);
Hidden = GetLayer('back');
}
<--/script> #had to comment this out
</head>
<body onload="init();" marginheight="0" marginwidth="0"
topmargin="0" leftmargin="0">
<div id="front" style="position:absolute; width:100%; height:100%;">
<table align="center" height="100%">
<tr>
<td width="600" height="100%" style="font-size:24pt;">
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
H<font color="ffffff">idden Tex</font>t
</td>
</tr>
</table>
</div>
<div id="back" style="position:absolute; clip:rect(0 0 0 0);
width:100%; height:100%;">
<table align="center" height="100%">
<tr>
<td width="600" height="100%" style="font-size:24pt;">
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
H<font color="000000">idden Tex</font>t
</td>
</tr>
</table>
</div>
</body>
</html>
Code: Select all
import java.awt.*;
import java.applet.Applet;
public class Rate_GUI extends Applet {
Label labelSuche1, labelSuche2, labelSuche3;
Label labelText1, labelText2;
TextField textfieldVersuch1, textfieldVersuch2,
textfieldVersuch3;
Button buttonInfo, buttonNeu, buttonVersuch;
TextArea textareaInfo;
public void init() {
setLayout(null);
labelText1 = new Label ("Raten Sie die 3 Ziffern");
labelText2 = new Label ("Lösungen");
labelSuche1 = new Label ("X");
labelSuche2 = new Label ("X");
labelSuche3 = new Label ("X");
textfieldVersuch1 = new TextField("");
textfieldVersuch2 = new TextField("");
textfieldVersuch3 = new TextField("");
buttonInfo = new Button("Info");
buttonNeu = new Button("Neues Spiel");
buttonVersuch = new Button("Versuchen");
textareaInfo = new TextArea();
labelText1.setBounds(20,25,350,25);
labelText2.setBounds(20,70,120,25);
labelSuche1.setBounds(175,70,25,25);
labelSuche2.setBounds(255,70,25,25);
labelSuche3.setBounds(335,70,25,25);
textfieldVersuch1.setBounds(170,110,25,25);
textfieldVersuch2.setBounds(250,110,25,25);
textfieldVersuch3.setBounds(330,110,25,25);
buttonInfo.setBounds(20,160,80,25);
buttonNeu.setBounds(140,160,100,25);
buttonVersuch.setBounds(280,160,100,25);
textareaInfo.setBounds(20,210,360,140);
add(labelText1); add(labelText2);
add(labelSuche1); add(labelSuche2); add(labelSuche3);
add(textfieldVersuch1); add(textfieldVersuch2);
add(textfieldVersuch3);
add(buttonInfo); add(buttonNeu); add(buttonVersuch);
add(textareaInfo);
}
}
Code: Select all
javac filename.java
Code: Select all
java -version