html select box 에 있는 text값을 맵핑한 곳에 매개변수로 보내고 싶습니다 도와주세요.

조회수 1670회
<select name="account" onChange="getSelectValue(this.form);">
<option value="oms_acc" selected>농협 01024595877-09 (예금주
    : XXX)</option>
<option value="joo_acc">우리 237097-56-098331 (예금주 : XXX)</option>
<option value="les_acc">국민 480-331-098356 (예금주 :XXX)</option>
<option value="smh_acc">하나 11259-27-1649782 (예금주 : XXX)</option>
</select>

<script>
var account = [ document.getElementByName("account").selelctedIndex ].text;
function getSelectValue(frm) {
    alert("바뀜");
    alert(account);
    account = [ document.getElementByName("account").selelctedIndex ].text;
    alert(account);
}
</script>

<a
href="contentBuy.do?id=<%=writeDTO.getM_id()%>&category=<%=name%>&seq=<%=writeDTO.getW_seq()%>&title=<%=writeDTO.getW_title()%>&price=<%=writeDTO.getW_price()%>&account="+"&{account};">구매하기</a>

account select box에 있는 text값들(우리 237097-56-098331 (예금주 : XXX) or 국민 480-331-098356 (예금주 :XXX) 등)을 contentBuy.do 이 맴핑한 곳에 보낼때 다른 건 다 잘 넘겨지는데

account="+"&{account}; 이것만 값이 넘어가질 않아서요,,,,ㅠㅜ 혹시 다른 방법이 있을까요??

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)