public static int slumpa(int min, int max) {
return (int)(Math.random() * (max + 1 - min) + min);
} Filter
2003-11-18
Slump
Java
2003-11-13
Fönsterstorlek
Javascript
javascript:top.resizeTo(800,600) 2003-11-11
Browser & platform properties
Javascript
/**
* Date: 2001-09-25
* Author: Joel Lundberg
* Description: Class containing browser and platform properties.
**/
function Browser() {
this.agent=navigator.appVersion;
this.version=parseInt(navigator.appVersion);
if (this.agent.indexOf("Windows")>-1) this.platform="win";
if (this.agent.indexOf("Mac")>-1) this.platform="mac";
this.ie=(navigator.appName.indexOf("Microsoft Internet Explorer")>-1)?true:false;
this.ns=(navigator.appName.indexOf("Netscape")>-1)?true:false;
this.ie4=(this.agent.indexOf("MSIE 4")>-1)?true:false;
this.ie5=(this.agent.indexOf("MSIE 5")>-1)?true:false;
this.ie55=(this.agent.indexOf("MSIE 5.5")>-1)?true:false;
this.ns4=(this.ns && this.version==4)?true:false;
this.ns6=(this.ns && this.version>=5)?true:false;
}
var b = new Browser(); 