CnUnix

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ CnUnix ] in KIDS
글 쓴 이(By): cookie ()
날 짜 (Date): 2002년 10월  1일 화요일 오전 11시 54분 28초
제 목(Title): Re: HTML FORM에서 image button.



앞에 guest 분의 답을 참고로 여러가지 실험 끝에 채택한 것은 다음과 같습니다.

더 좋은 방법 있으신 분 있으신가요?

<script> <!--
function do_submit(mychoice)
{   
        document.myform.choice.value=mychoice;
        document.myform.submit();
}
// --> </script>

<form name="myform" action="index.cgi" onsubmit=do_submit("OK")>
<input type=hidden choice="undef" >
        <a href=javascript:do_submit("first") >
        <img src="image/first.jpg"  alt="First Choice" border=0 > </a>
        <a href=javascript:do_submit("second") >
        <img src="image/second.jpg"  alt="Second Choice" border=0 > </a>
</form>

PS) 이걸 매크로 같은 걸로 만들고 싶은데...

 myform 대신 generic 한 이름 (예를 들어 current-form 이나 this.form[0] 같이 

 쓰고 싶은데 방법이???

[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.