form 의 action 필드를 전환하는 방법 정보
PHP form 의 action 필드를 전환하는 방법관련링크
본문
<script type="text/javascript">
function OnSubmitForm()
{
if(document.pressed == 'Insert')
{
document.myform.action ="insert.html";
}
else if(document.pressed == 'Update')
{
document.myform.action ="update.html";
}
return true;
}
</script>
<form name="myform" onsubmit="return onsubmitform();">
<input type="submit" name="operation" onclick="document.pressed=this.value" value="insert" />
<input type="submit" name="operation" onclick="document.pressed=this.value" value="update" />
</form>
function OnSubmitForm()
{
if(document.pressed == 'Insert')
{
document.myform.action ="insert.html";
}
else if(document.pressed == 'Update')
{
document.myform.action ="update.html";
}
return true;
}
</script>
<form name="myform" onsubmit="return onsubmitform();">
<input type="submit" name="operation" onclick="document.pressed=this.value" value="insert" />
<input type="submit" name="operation" onclick="document.pressed=this.value" value="update" />
</form>
추천
4
4
댓글 7개
중복게시물로 싱고합니다... ㅋ
... 잠깐 사이에 그 전게시물이 삭제되었더러구요 .... 싱고보류 ~~~
... 잠깐 사이에 그 전게시물이 삭제되었더러구요 .... 싱고보류 ~~~
리자님 이러시면 곤란하심 -_- 신고 할까용 -_-??
헉 신고 할려니 활동지수 1점 부족 ㅠ.ㅠ
그래도 1회 추천은 제가 했다는거.... --ㅋ
헉 신고 할려니 활동지수 1점 부족 ㅠ.ㅠ
그래도 1회 추천은 제가 했다는거.... --ㅋ
그 전 게시물이 지워졌습니다.
이러면 또 링크 오작동 발령이군요 .... 에효 ....
이러면 또 링크 오작동 발령이군요 .... 에효 ....
오신김에 추천이나 해주세요. ㅎㅎ
이미 추천은 해드려서 더 추천은 불가 합니다 --ㅋ
대신 리자님 코드 날로 먹기 모드 ^^;;
-----------------------------------------------------------
<script>
function rtcheckfrm() {
var frm = document.mms80form;
if (frm.yayak[1].checked){
frm.action = "./Upload2";
} else {
frm.action = "./Upload";
}
return true;
document.form.submit();
}
</script>
<FORM name=mms80form enctype="multipart/form-data" method="post" onSubmit="return rtcheckfrm();">
필요폼 내용들.....
<input type="radio" name="yayak" value="0" checked> 즉시
<input type="radio" name="yayak" value="1"> 예약
<input type='image' src="img/sms/mobil_send.gif" name='Send' title="전송할려면 눌러유~~~">
</FORM>
이렇게 하시면 1개의 submit 문으로 -_-;;; radjo 버턴으로 대처하실수 있을듯 합니다..
대신 리자님 코드 날로 먹기 모드 ^^;;
-----------------------------------------------------------
<script>
function rtcheckfrm() {
var frm = document.mms80form;
if (frm.yayak[1].checked){
frm.action = "./Upload2";
} else {
frm.action = "./Upload";
}
return true;
document.form.submit();
}
</script>
<FORM name=mms80form enctype="multipart/form-data" method="post" onSubmit="return rtcheckfrm();">
필요폼 내용들.....
<input type="radio" name="yayak" value="0" checked> 즉시
<input type="radio" name="yayak" value="1"> 예약
<input type='image' src="img/sms/mobil_send.gif" name='Send' title="전송할려면 눌러유~~~">
</FORM>
이렇게 하시면 1개의 submit 문으로 -_-;;; radjo 버턴으로 대처하실수 있을듯 합니다..
스크립트 방식까지 나와 있으면 완전 강추입니다.