코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>HTML form tag - name attribute</title> </head> <body> <form action="/examples/media/action_target.php" name="loginform"> 이름 : <input type="text" name="st_name"><br> 학번 : <input type="text" name="st_id"><br> 학과 : <input type="text" name="department"><br> <input type="button" onclick="submit()" value="제출하기"> </form> <script> function submit() { document.forms["loginform"].submit(); } </script> </body> </html>