i have something to ask…
- How to dynamically change the action for the form tag from username & password value that we get.. example when the value is admin, the action form will dedicated to index_admin.html.
Or
2.how to change the value of “#batas” based on username & password.. in case, on the different file.
here’s the code for index.html
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.html">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="product.html">Product</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="masuk.html" id="batas">Masuk</a>
</li>
</ul>
</div>
and here is the login page’s code
<form action="" id="form_id" method="post" name="myForm">
<script>
document.get
</script>
<table>
<tr>
<td><label for="username">Username</label></td>
<td><input type="text" name="username" id="username" placeholder="Masukkan username" ></td>
</tr>
<tr>
<td><label for="password">Password</label></td>
<td><input type="password" name="password" id="password" placeholder="Masukkan password" ></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="login" id="submit" onclick="validate()"></td>
</tr>
</table>
</form>
Thank you very much for someone who asnwer this