2020-11-22 17:11:23 +01:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="la">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<title>Familia Romana – Pensum A</title>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function validate() {
|
|
|
|
|
const forms = document.querySelectorAll('form');
|
|
|
|
|
const form = forms[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Array.from(form.elements).forEach((input) => {
|
|
|
|
|
console.log(input);
|
|
|
|
|
if (input.type=="text" && input.value != input.dataset.expected) {
|
|
|
|
|
input.setAttribute("style", "border-color:red");
|
|
|
|
|
console.log('incorrect!')
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
console.log('dupa');
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<form class="Pensum_A" onsubmit="return validate();">
|
2020-11-23 01:15:19 +01:00
|
|
|
|
{{pensum_content|safe}}
|
|
|
|
|
<br>
|
2020-11-22 17:11:23 +01:00
|
|
|
|
<input type="submit" value="Submit">
|
|
|
|
|
</form>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|