place scripts in index as template
This commit is contained in:
parent
48813dc129
commit
b5f1ccf98d
3 changed files with 21 additions and 12 deletions
|
@ -22,9 +22,8 @@
|
|||
<button onclick="registerUser()" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
{{template "scripts" .}}
|
||||
<script>
|
||||
function registerUser() {
|
||||
const username = document.getElementById("username").value;
|
||||
|
@ -42,4 +41,4 @@
|
|||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
Reference in a new issue