Hittade detta i mina gömmor, kanske kan vara nått.
[RED]<html><head>
<script type="text/javascript">
<!--
var _swForm;
var _swElem;
var _run = 0;
var _start;
var _now;
function stopWatch1() {
_now = new Date();
document.forms[_swForm].elements[_swElem].value = ( _now.getTime() - _start.getTime() ) / 1000;
if (_run == 2) {
setTimeout("stopWatch1()", 100);
}
}
function stopWatch(formNo, textNo, buttonNo) {
if (stopWatch.arguments.length == 0) {
if (_run == 1) {
_run = 2;
stopWatch1();
} else if (_run == 2) {
_run = 1;
}
} else if (_run == 0) {
_swForm = formNo;
_swElem = textNo;
_run = 2;
document.forms[formNo].elements[buttonNo].value = "Stop";
_start = new Date();
stopWatch1();
} else if (_run == 1 || _run == 2) {
_swForm = formNo;
_swElem = textNo;
_run = 0;
document.forms[formNo].elements[buttonNo].value = "Starta om";
}
}
//-->
</script>
</head><body>
<form name="form1">
<input type=text name="text1" size="8"><input type="button" name="button1" value="Start" onclick="stopWatch(0, 0, 1);"><input type="button" name="button1" value="Mellantid" onClick="stopWatch();">
</form>
</body></html>[/RED]

