Hi there,
I practice some coding about form and input attribute, but action attribute with form tag keep submit stay on the same page.
I copied and pasted same code from W3C, which works on their web, but doesn’t work on my browser. I use safari and chrome.
Here is my coding.
Many thanks
type or paste code here
<form action="/action_page.php" target="_blank" method="get">
<label for="username">Username:</label>
<input type="text" id="username" name="username" value="" maxlength="10" required> <br>
<!-- text attribute input text -->
Your Name: <input type="text" name="name" required> <br>
<br>
<label for="password">Password</label>
<input type="password" id="password" name="pwd" required> <br>
<!-- password attribute hides password -->
Gender: Male<input type="radio" name="gender" value="Male"> Female<input type="radio" name="gender" value="female"> Not to tell <input type="radio" name="gender" value="0" checked><br>
<!-- radio is single choice. Single choice sections must all under same name attribute-->
Hobby: Swimming <input type="checkbox" name="hobby" value="swimming" checked> Basketball <input type="checkbox" name="hobby" id=""> <br>
<!-- checkbox is multiple choices -->
<!-- Name is used to differ different elements -->
<input type="submit" value="FREE SIGN UP">
<!-- Button function need to bw combine with JS -->
<input type="button" value="get SMS code"> <br>
</form>