첫번째한개만되요.. 정보
첫번째한개만되요..본문
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가 갈까요?
{
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" />
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" />
오와되요!감사합니다><ㅎㅎ
<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_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" />