Denne bruger jeg
var DEFAULT_TIMELEFT = 30; Tid og ccam.jpg billedet fra webcam.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"
http://www.w3.org/TR/html4/strict.dtd"><html>
<head>
<title>ConquerCam Web Cam Image</title>
<script language="JavaScript">
<!--
var DEFAULT_TIMELEFT = 30;
var timeLeft = DEFAULT_TIMELEFT;
function refreshImage() {
// loads image "ccam.jpg" from same location as this HTML document.
document.webcam.src = "ccam.jpg" + "?" + new Date().getTime();
// if you use the 'Image Server' feature of ConquerCam you are
// able to type in URLs like this -- make sure to change it in
// the initial image (further down in this document) as well
// document.webcam.src = "
http://<your ip address>:8181/" + "?" + new Date().getTime();
timeLeft = DEFAULT_TIMELEFT;
}
function countDown() {
timeLeft--;
setTimeout("countDown()", 1000);
updateUICounter();
if (timeLeft <= 0) {
refreshImage();
}
}
function updateUICounter() {
if (timeLeft != 0) {
msg = "Image will update in " + timeLeft + " " +
((timeLeft != 1) ? "seconds" : "second") + "."
} else {
msg = "Image is updating!";
}
if ((navigator.appName.indexOf("Internet Explorer") != -1) &&
(navigator.appVersion.indexOf("4.") != -1))
{
lblCounter.innerHTML = msg;
} else {
// on incapable browsers, we update statusbar instead of
// printing it below image
window.status = msg;
}
}
// -->
</script>
<style>
body, table, tr, th, td, p, div {
color: white;
font-family: Verdana, Helvetica, Arial, Sans-serif;
font-size: 10pt;
}
td.desc {
font-size: 8pt;
}
a {
color: #DDDD00;
font-weight: bold;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
hr.l {
border: 1px dashed #bbbbbb;
height: 1px;
}
hr.ls {
border-bottom: 3px double #bbbbbb;
height: 3px;
}
</style>
</head>
<body onLoad="countDown()" bgcolor="#808080">
<table border=0 width=100% cellpadding=4 cellspacing=0>
<tr>
<td valign="top" align=right height="0" width="100%">
<hr class=l width=240>
<b>My Web Cam View</b> <img hspace="14" src="icon_arrow.gif" border=0 width=6 height=10 align=absmiddle><br>
<hr class=l width=240>
</td>
<td valign="top" rowspan="4">
<table border=0 cellspacing="0" cellpadding=2 bgcolor=black>
<tr>
<td><img name=webcam id="webcam" border=0 src="ccam.jpg" width=320 height=240></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" align="right" height="0" width="100%">
<span id="lblCounter">Click "Refresh" to update image.</span>
</td>
</tr>
<tr>
<td align="right" valign="top" height="100%" width="100%">
<hr class=ls width=240>
</td>
</tr>
<tr>
<td align="right" valign="top" height="100%" width="100%" class=desc>
This area enables you to type in some text for the image shown on
your right. If you like to change the text, simply open this file
(webcam.html) and change it using notepad or your favorite
HTML editor.<br>
<br>
<br>
<a href="#" onClick="refreshImage()"><img border="0" src="btn_refresh.gif" width="68" height="16"></a>
</td>
</tr>
<tr>
<td colspan=2 align=right style="font-size: 7pt">
<hr style="border: 1px solid #CCCCCC" size=1>
Powered by <a href="
http://www.conquercam.com/" target=_blank>ConquerCam</a>
</td>
</tr>
</table>
</body>
</html>