Javascript referens
Window metoder
sOpenArguments = “menubar=yes|no, toolbar=yes|no, status= yes|no, resizable=yes|no, scrollbars=yes|no,
fullscreen=yes/no, location=yes|no)“ (directories Netscape) titlebar, z-lock, innerWidth, innerHeight
newWin = open(“", “windowname" [width=w, height=h] [, left=x, top=y] [, sOpenArguments]); newWin.close(); newWin.closed;
alert("text"); bQuit=confirm("sluta"); /* yes/no */; sAnswer = prompt(“fråga", “default", “rubrik");
showModalDialog(“tmplt.htm", vArgs, “dialogTop=’npx’ dialogLeft=’npx" dialogHeight=’npx’ dialogWidth=’npx’ [sOpenArguments]);
showModelessDialog(“tmplt.htm", vArgs, “dialogTop=’npx’ dialogLeft=’npx" dialogHeight=’npx’ dialogWidth=’npx’ [sOpenArguments]);
dialogArguments[i] /* hantering av argument till och från dialog */
showHelp(…); createPopup(…); clipboardData; (object för att hantera urklipp) external; (Externa object och metoder)
navigate(url)
ref=setTimeout("JS code", ms); clearTimeout(ref); ref=setInterval("JS code", ms); clearInterval(ref);
status; /* text på statysraden */ defaultStatus;
self.status = text /* samma som window eller utesluta och bara skriva status */;
parent, top, opener (window objekt), refferer, domain (?)
frames (alla ramobjekt) t.ex frames[0].document; parent.frames; top.frames; top.frameName
history : history.length; history.go (+/- n); history.back(); history.forward();
// ex <a href="javascript:history.go(-1);"> // Länk för att gå bakåt I tidigare listan. .next,.previous,.current
location : location.href; location.reload(true); (laddar om, påverkar inte history) location.replace();
(Ersätter med ev. ny länk i href) location.search(url); (sidor med sökning)
location.protocol; location.host; location.port; location.hash; location.hostname; location.search; (location.href uppdelat)
navigator : navigator.appName; navigator.userAgent; navigator.appCodeName; navigator.appVersion; även clientInformation.*
(Netscape navigator.language; navigator.platform; navigator.plugins, navigator.mimeTypes)
screenLeft, screenTop, screen.width, screen.height
resizeTo(width, height), resizeBy(dx, dy); moveTo(x, y); moveBy(dx, dy)
scroll(x,y) ej IE : scrollTo(), scrollBy(),
fullscreen=yes/no, location=yes|no)“ (directories Netscape) titlebar, z-lock, innerWidth, innerHeight
newWin = open(“", “windowname" [width=w, height=h] [, left=x, top=y] [, sOpenArguments]); newWin.close(); newWin.closed;
alert("text"); bQuit=confirm("sluta"); /* yes/no */; sAnswer = prompt(“fråga", “default", “rubrik");
showModalDialog(“tmplt.htm", vArgs, “dialogTop=’npx’ dialogLeft=’npx" dialogHeight=’npx’ dialogWidth=’npx’ [sOpenArguments]);
showModelessDialog(“tmplt.htm", vArgs, “dialogTop=’npx’ dialogLeft=’npx" dialogHeight=’npx’ dialogWidth=’npx’ [sOpenArguments]);
dialogArguments[i] /* hantering av argument till och från dialog */
showHelp(…); createPopup(…); clipboardData; (object för att hantera urklipp) external; (Externa object och metoder)
navigate(url)
ref=setTimeout("JS code", ms); clearTimeout(ref); ref=setInterval("JS code", ms); clearInterval(ref);
status; /* text på statysraden */ defaultStatus;
self.status = text /* samma som window eller utesluta och bara skriva status */;
parent, top, opener (window objekt), refferer, domain (?)
frames (alla ramobjekt) t.ex frames[0].document; parent.frames; top.frames; top.frameName
history : history.length; history.go (+/- n); history.back(); history.forward();
// ex <a href="javascript:history.go(-1);"> // Länk för att gå bakåt I tidigare listan. .next,.previous,.current
location : location.href; location.reload(true); (laddar om, påverkar inte history) location.replace();
(Ersätter med ev. ny länk i href) location.search(url); (sidor med sökning)
location.protocol; location.host; location.port; location.hash; location.hostname; location.search; (location.href uppdelat)
navigator : navigator.appName; navigator.userAgent; navigator.appCodeName; navigator.appVersion; även clientInformation.*
(Netscape navigator.language; navigator.platform; navigator.plugins, navigator.mimeTypes)
screenLeft, screenTop, screen.width, screen.height
resizeTo(width, height), resizeBy(dx, dy); moveTo(x, y); moveBy(dx, dy)
scroll(x,y) ej IE : scrollTo(), scrollBy(),