회원가입버튼 문의좀 할께요..ㅠㅠ 정보
회원가입버튼 문의좀 할께요..ㅠㅠ본문
회원약관을 동의하고 전송버튼을 누르면 각기 다른 페이지로 이동이 되야하는데.
어떻게 해야하죠?
예를들어 약관을 체크하고
전송버튼1을 누르면 네이버로
전송버튼2를 누르면 다음으로.. 이렇게요.
------------------------------------------------소스
회원가입쪽 소스보면
<form name="fregister" method="POST" onsubmit="return fregister_submit(this);" autocomplete="off">
<input type=radio value=1 name=agree id=agree11>
동의함
<input type=radio value=0 name=agree id=agree10>
동의안함
전송버튼1<input type=image src="">
전송버튼2<input type=image src="">
전송버튼3<input type=image src="">
전송버튼4<input type=image src="">
<script type="text/javascript">
function fregister_submit(f)
{
var agree1 = document.getElementsByName("agree");
if (!agree1[0].checked) {
alert("회원가입약관의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
agree1[0].focus();
return false;
}
var agree2 = document.getElementsByName("agree2");
if (!agree2[0].checked) {
alert("개인정보취급방침의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
agree2[0].focus();
return false;
}
f.action = "./register_form.php";
return true;
}
if (typeof(document.fregister.mb_name) != "undefined")
document.fregister.mb_name.focus();
</script>
어떻게 해야하죠?
예를들어 약관을 체크하고
전송버튼1을 누르면 네이버로
전송버튼2를 누르면 다음으로.. 이렇게요.
------------------------------------------------소스
회원가입쪽 소스보면
<form name="fregister" method="POST" onsubmit="return fregister_submit(this);" autocomplete="off">
<input type=radio value=1 name=agree id=agree11>
동의함
<input type=radio value=0 name=agree id=agree10>
동의안함
전송버튼1<input type=image src="">
전송버튼2<input type=image src="">
전송버튼3<input type=image src="">
전송버튼4<input type=image src="">
<script type="text/javascript">
function fregister_submit(f)
{
var agree1 = document.getElementsByName("agree");
if (!agree1[0].checked) {
alert("회원가입약관의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
agree1[0].focus();
return false;
}
var agree2 = document.getElementsByName("agree2");
if (!agree2[0].checked) {
alert("개인정보취급방침의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
agree2[0].focus();
return false;
}
f.action = "./register_form.php";
return true;
}
if (typeof(document.fregister.mb_name) != "undefined")
document.fregister.mb_name.focus();
</script>
댓글 전체
전송버튼1<input type=image src="">
전송버튼2<input type=image src="">
이렇게하여 submit버튼이 액션이 다르게 지정할 수는 없습니다
<input type='button' onclick='mysumbit(1)' value='야후'>
<input type='button' onclick='mysumbit(2) value='네이버'>
function mysubmit(vv){
if(vv==1) 폼.action='야후';
else 폼.action='네이버';
폼.submit()
이런 형테로 하면 될 겁니다
전송버튼2<input type=image src="">
이렇게하여 submit버튼이 액션이 다르게 지정할 수는 없습니다
<input type='button' onclick='mysumbit(1)' value='야후'>
<input type='button' onclick='mysumbit(2) value='네이버'>
function mysubmit(vv){
if(vv==1) 폼.action='야후';
else 폼.action='네이버';
폼.submit()
이런 형테로 하면 될 겁니다