Temat: Lato 2019 arkusz 5
<script>
function fun1()
{
var imie = document.getElementById('imie');
var naz = document.getElementById('naz');
var email = document.getElementById('email');
var usluga = document.getElementById('usluga');
var check = document.getElementById('check');
var wynik = document.getElementById('wynik');
//
if (check.checked)
{
wynik.style.color = "black";
wynik.innerHTML=imie.value.toUpperCase()+" "+naz.value.toUpperCase()+"<br>"
+"Treść twojej sprawy: "+usluga.value+"<br>"
+"Na podany adres e-mail zostanie wysłana oferta";
}
else
{
wynik.style.color = "red";
wynik.innerHTML="Musisz zapoznac sie z regulaminem";
}
}
</script>
<form>
<table>
<tr>
<td>Imie:</td><td><input type="text" name="" id="imie"></td>
</tr>
<tr>
<td>Nazwisko:</td><td><input type="text" name="" id="naz"></td>
</tr>
<tr>
<td>E-mail:</td><td><input type="text" name="" id="email"></td>
</tr>
<tr>
<td>Usługa:</td><td><textarea name="" id="usluga" cols="30" rows="10"></textarea></td>
</tr>
<tr>
<td></td><td><input type="checkbox" name="" id="check">Zapoznałam/em sie z regulaminem</td>
</tr>
<tr>
<td></td><td><input type="reset" value="Resetuj">
<input type="button" value="Prześlij" onclick="fun1()"></td>
</tr>
</table>
</form>
<hr>
<center>
<span id="wynik"></span>
</center>