반응형

<html>
<script language=javascript>
function getPost(mode)
{
var theForm = document.frmSubmit;
if(mode == "01")
{
theForm.method = "post"; 
theForm.target = "_self";
 theForm.action = "test01.asp";
}
else if(mode == "02")
{
  theForm.method = "get";
  theForm.target = "_blank";
  theForm.action = "test02.asp"
}
theForm.submit();
}
</script>
<body>
<form name=frmSubmit>
<input type=text name=txt1><br>
<input type=text name=txt2><br>
<input type=button name=btn1 value="Submit01" onClick="getPost('01')">
<input type=button name=btn2 value="Submit02" onClick="getPost('02')">
</form>
</body>
</html>

반응형

'프로젝트 관련 조사 > ' 카테고리의 다른 글

JSON javascript 읽기  (0) 2016.05.05
구글 해킹 참고자료  (0) 2016.05.05
구글 확장프로그램 만들기 목표  (0) 2016.05.03
구글 확장 프로그램 - Overview  (0) 2016.05.03
구글 확장 프로그램  (0) 2016.05.03

+ Recent posts