mirror of
https://github.com/andrewkdinh/simple-contact.git
synced 2024-11-23 03:14:43 -08:00
Fix JavaScript
This commit is contained in:
parent
5f69ef38dd
commit
19fe768aa1
@ -18,8 +18,10 @@
|
|||||||
<body>
|
<body>
|
||||||
<p>{{ message }}</p>
|
<p>{{ message }}</p>
|
||||||
{% if attempts_left %}
|
{% if attempts_left %}
|
||||||
<p class="script-only">You have {{ attempts_left }} attempt(s) left</p>
|
<span class="script-only">
|
||||||
<input class="script-only" type="button" value="Go back" onclick="window.history.back()" />
|
<p >You have {{ attempts_left }} attempt(s) left</p>
|
||||||
|
<input type="button" value="Go back" onclick="window.history.back()" />
|
||||||
|
</span>
|
||||||
<noscript>
|
<noscript>
|
||||||
<a href="/">Go back to homepage</a>
|
<a href="/">Go back to homepage</a>
|
||||||
</noscript>
|
</noscript>
|
||||||
@ -34,12 +36,9 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script>
|
<script defer>
|
||||||
let elems = document.getElementsByClassName("script-only");
|
let elems = document.getElementsByClassName("script-only");
|
||||||
let i;
|
elems[0].classList.remove("script-only");
|
||||||
for (i=0; i < elems.length; i++) {
|
|
||||||
elems[i].classList.remove("script-only");
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user