<script><!--mce:0--></script> <strong>Questo script ricarica un'immagine, e non la pagina</strong> <script type="text/javascript"><!--mce:1--></script>
Daily Archive for Agosto 29th, 2008
<script type="text/javascript"> function CodiceTasto(e) { alert("Codice del tasto premuto: " + e.keyCode + "\n"); } </script> <input onkeydown="CodiceTasto(event)" name="password" size="20" type="text" />
Di seguito è mostrato un esempio: provate a scrivere nel box sottostante…
<script language="JavaScript" type="text/javascript">
// Prelevato e spiegato su: http://www.web-link.it
function showFilled(Value)
{
return (Value > 9) ? "" + Value : "0" + Value;
}
function StartClock24()
{
TheTime = new Date;
document.clock.showTime.value = showFilled(TheTime.getHours()) + ":" + showFilled(TheTime.getMinutes()) + ":" + showFilled(TheTime.getSeconds());
setTimeout("StartClock24()",1000)
}
</script>
<style type="text/css">
<!--
.input
{
border-style: none;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 10pt;
color : red;
}
-->
</style>
<body onLoad="StartClock24()">
<div align='center'>
<form name="clock"><input type="text" name="showTime" size="8" class="input"></form>
</div>
</body>Per aggiornare la pagina in modo automatico, basta scrivere il seguente codice tra i tag <head> come mostrato nell’esempio:
<head> <meta http-equiv="refresh" content="3"> </head>
content=”3″ indica 3 secondi

