1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
</head>
<body>
    
    <form name="frm">
      성: <input type="text" name="fname" value="홍"><br>
      이름: <input type="text" name="lname" value="길동"><br>
    </form>
    <button onclick="doSend();">폼전송</button>
 
    <script>
 
        function doSend() {       
            // frm.encoding = "multipart/form-data";                 //파일 업로드시...
            frm.encoding "application/x-www-form-urlencoded";   //default
            frm.action="test.jsp";
            frm.method="get";
            frm.submit();        
        }
 
    </script>
    
</body>
</html>


반응형
Posted by 힘없는염소