Ominide 690 punti

<html>
<head>
<title>Moduli</title>
<STYLE TYPE="text/css">

BODY
{
color:#0000ff;
background-color:#dddddd;
font-family:Verdana;
}
A:link{color:#00ff00}
A:visited{color:ff0000}
<style type="text/css">
table.sample {
border-width: 1px;
border-spacing: 2px;
border-style: outset;
border-color: blue;
border-collapse: collapse;
background-color: white;
}
table.sample th {
border-width: 1px;
padding: 4px;
border-style: inset;
border-color: blue;
background-color: yellow;
-moz-border-radius: ;
}
table.sample td {
border-width: 1px;
padding: 4px;
border-style: inset;
border-color: blue;
background-color: white;
-moz-border-radius: ;
}
</style>

</STYLE>
<script>
function dividi(){

a = documento.modulo.a.value;
b = documento.modulo.b.value;

q = Math.floor(a / b);
document.modulo.q.value = q;
r= a - b*q;
document.modulo.r.value = r;
return false;
}
</script>
</head>
<body>
<h2 align="center">Modulo che acquisisce dati</h2>
<form name="modulo" method="get" action="" onSubmit="return(dividi());">
<table class="sample" width="80%" border="1" align="center">
<tr>
<th>Dividendo</th>
<th><input name="a" type="text" onKeyUp="return(dividi());"></th>
</tr>
<tr>
<th>Divisore</th>
<th><input name="b" type="text" onKeyUp="return(dividi());"></th>
</tr>
<tr>
<th>Quoziente</th>
<th><input name="q" type="text"></th>
</tr>
<tr>
<th>Resto</th>
<th><input name="r" type="text"></th>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="Go" value="Fai il Calcolo">
<input type="reset" name="clean" value="Pulisci il modulo">
</td>
</tr>
</form>
</body>
</html>

Hai bisogno di aiuto in Informatica?
Trova il tuo insegnante su Skuola.net | Ripetizioni
Registrati via email