1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| <html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>
<form name = "f">
<label for="Note">Mettez une note d'appréciation du site de 1 à 10</label>
<select id="note_list" name="list">
<option value="0">0
<option value="1">1
<option value="2">2
<option value="3">3
<option value="4">4
<option value="5">5
<option value="6">6
<option value="7">7
<option value="8">8
<option value="9">9
<option value="10">10
</select>
<input type="submit" disabled = "true" id="soumettre" value="Soumettre" onClick="liste(f)"/>
<input type="button" id="moyenne" value="Moyenne des notes" disabled="true"/>
</form>
<script type="text/javascript">
$('#note_list').change(function() {
$('#soumettre').removeAttr('disabled');
console.log($(this).val())
});
</script>
</body>
</html> |