<html>
<head>
<title>Vanster</title>
<script language="javascript">
function twoframes() {
parent.hoger.location="hoger.htm";
parent.topp.location="topp.htm";
}
</script>
</head>
<body>
<a href="javascript:twoframes();">Länk</a>
</body>
</html> Filter
2001-06-07
Kontrollera ett frameset
Javascript
2001-06-06
Framebuster
Javascript
if (window != top) top.location.href = location.href;
// variant åt andra hållet...
if (window == top) top.location.href = 'frameset.htm'; 2001-05-30
Länk-knapp
Javascript
<form>
<input type="button" value="Gå till nysida" onClick="location.href='nysida.htm';">
</form> 2001-05-30
Fönsterattribut
Javascript
window.open() Method Attributes Controllable via Script
Attribute Value Description
toolbar Boolean "Back", "Forward" and other buttons in the row
location Boolean Field displaying the current URL
directories Boolean "What’s New" and other buttons in the row
status Boolean Statusbar at bottom of window
menubar Boolean Menubar at top of window
scrollbars Boolean Displays scrollbars if document is larger than window
resizable Boolean Interface elements that allow resizing by dragging
copyhistory Boolean Duplicates Go menu history for new window
width pixelCount Window outer width in pixels
height pixelCount Window outer height in pixels
2001-05-29
Klocka
Javascript
<script language="JavaScript">
var tid = new Date();
var tims = tid.getHours();
var mins = tid.getMinutes();
var secs = tid.getSeconds();
var timsnolla = '';
var minsnolla = '';
var secsnolla = '';
function Update() {
secs++;
if (secs > 59) {
secs = 0;
mins++;
}
if (mins > 59) {
mins = 0;
tims++;
}
if (tims > 23) {
tims = 0;
}
if (secs < 10) {
secsnolla = '0';
} else {
secsnolla = '';
}
if (mins < 10) {
minsnolla = '0';
} else {
minsnolla = '';
}
if (tims < 10) {
timsnolla = '0';
} else {
timsnolla = '';
}
document.formular.klocka.value = timsnolla + tims +
':' + minsnolla + mins + ':' + secsnolla + secs;
id = window.setTimeout("Update();",1000);
}
</script> 