첫번째한개만되요.. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

첫번째한개만되요.. 정보

첫번째한개만되요..

본문

function sendit()
{
var str;
str=document.getElementById('what').value;

str = '../gnuboard4/bbs/board.php?bo_table=abc&sca=&sfl=state%7C%7Calarm%7C%7Cca_thema%7C%7Cmb_id%7C%7Cca_name%7C%7Csi%7C%7Cgu%7C%7Cdong%7C%7Cwhat&si=&gu=&dong=&ca_name=&ca_thema=&state=%EB%93%B1%EB%A1%9D&stx=%EB%93%B1%EB%A1%9D+1+++++++'+str+'+&mb_id=&alarm=1&what='+str+'&cstyle=6&sop=and';
str = str+'';

parent.document.gForm.target='myfrm';
parent.document.gForm.action = str;
parent.document.gForm.submit();
alert(str);
//return true;
}


<input type="image" src="images/main_images/gnb_menu20.gif" name="menu" id='what'  stus='off' pos='02' style='cursor:pointer;cursor:hand;border:0' value="%EB%A7%A4%EB%A7%A4" onclick="sendit(this)"border="0"height="38" width="43" /><input type="image" src="images/main_images/gnb_menu21.gif" name="menu" id='what' stus='off' pos='03' style='cursor:pointer;cursor:hand;border:0' value="%EC%A0%84%EC%84%B8" onclick="sendit(this)"border="0"height="38" width="45" /><input type="image" src="images/main_images/gnb_menu22.gif" name="menu" id='what' value="%EC%9B%94%EC%84%B8"  stus='off' pos='04' style='cursor:pointer;cursor:hand;border:0'onclick="sendit(this)"border="0"height="38" width="43" />

이케하면 첫번째 input type=image만 되요;
 어떻게하면 2번째꺼를 선택햇을떄 맞게 value가 갈까요?

댓글 전체

input문에 id값 name값 3개모두 똑같네요.



function sendit(vlu)
{
var str;
str=document.getElementById(vlu).value;

str = '../gnuboard4/bbs/board.php?bo_table=abc&sca=&sfl=state%7C%7Calarm%7C%7Cca_thema%7C%7Cmb_id%7C%7Cca_name%7C%7Csi%7C%7Cgu%7C%7Cdong%7C%7Cwhat&si=&gu=&dong=&ca_name=&ca_thema=&state=%EB%93%B1%EB%A1%9D&stx=%EB%93%B1%EB%A1%9D+1+++++++'+str+'+&mb_id=&alarm=1&what='+str+'&cstyle=6&sop=and';
str = str+'';

parent.document.gForm.target='myfrm';
parent.document.gForm.action = str;
parent.document.gForm.submit();
alert(str);
//return true;
}




<input type="image" src="images/main_images/gnb_menu20.gif" name="menu1" id='what1'  stus='off' pos='02' style='cursor:pointer;cursor:hand;border:0' value="%EB%A7%A4%EB%A7%A4" onclick="sendit(this)" border="0" height="38" width="43" />
<input type="image" src="images/main_images/gnb_menu21.gif" name="menu2" id='what2' stus='off' pos='03' style='cursor:pointer;cursor:hand;border:0' value="%EC%A0%84%EC%84%B8" onclick="sendit(this)" border="0" height="38" width="45" />
<input type="image" src="images/main_images/gnb_menu22.gif" name="menu3" id='what3' value="%EC%9B%94%EC%84%B8"  stus='off' pos='04' style='cursor:pointer;cursor:hand;border:0'onclick="sendit(this)" border="0" height="38" width="43" />
입력부분만 붙여넣어보세요.
<input type="image" src="images/main_images/gnb_menu20.gif" name="menu1" id='what1' stus='off' pos='02' style='cursor:pointer;cursor:hand;border:0' value="%EB%A7%A4%EB%A7%A4" onclick="sendit('what1')" border="0" height="38" width="43" />
<input type="image" src="images/main_images/gnb_menu21.gif" name="menu2" id='what2' stus='off' pos='03' style='cursor:pointer;cursor:hand;border:0' value="%EC%A0%84%EC%84%B8" onclick="sendit('what2')" border="0" height="38" width="45" />
<input type="image" src="images/main_images/gnb_menu22.gif" name="menu3" id='what3' stus='off' pos='04' style='cursor:pointer;cursor:hand;border:0' value="%EC%9B%94%EC%84%B8" onclick="sendit('what3')" border="0" height="38" width="43" />
<input type="image" src="images/main_images/gnb_menu20.gif" name="menu1" id='what1' stus='off' pos='02' style='cursor:pointer;cursor:hand;border:0' value="%EB%A7%A4%EB%A7%A4" onclick="sendit('what1')" border="0" height="38" width="43" />
<input type="image" src="images/main_images/gnb_menu21.gif" name="menu2" id='what2' stus='off' pos='03' style='cursor:pointer;cursor:hand;border:0' value="%EC%A0%84%EC%84%B8" onclick="sendit('what2')" border="0" height="38" width="45" />
<input type="image" src="images/main_images/gnb_menu22.gif" name="menu3" id='what3' stus='off' pos='04' style='cursor:pointer;cursor:hand;border:0' value="%EC%9B%94%EC%84%B8" onclick="sendit('what3')" border="0" height="38" width="43" />
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT