엘남매아빠

클릭할 때 폼 입력 내용이 바뀌게 할려면 어떻게 해야하나요?

· 19년 전 · 1264 · 2
 
위 사이트처럼 클릭할 때 폼 입력내용이 바뀌게 할려고 하는데..
 
어떻게 해야하는지 힌트좀 주세요..ㅠㅠ
|

댓글 2개

신청자1 에서 본인과 본인+가족 클릭시 변환하는거 말씀하세요?
예..
그것을 클릭하면 아래 입력하는 폼 내용이 바뀌게 하는것입니다.


<script>
function showTable(val) {

a = document.getElementById("div1");
b = document.getElementById("div2");
c = document.getElementById("div3");


if(val=="div1") {
a.style.display="inline";
b.style.display="none";
c.style.display="none";
}
else if(val=="div2"){
a.style.display="none";
b.style.display="inline";
c.style.display="none";
}
else{
a.style.display="none";
b.style.display="none";
c.style.display="inline";
}
}
</script>

<a href="#" onClick="showTable('div1')">div2</a>
<a href="#" onClick="showTable('div2')">div2</a>
<a href="#" onClick="showTable('div3')">div3</a>
<div id="div1" style='display:inline'>
<table>
<tr>
<td>div1
</td>
</tr>
</table>
</div>
<div id="div2" style='display:none'>
<table>
<tr>
<td>div2
</td>
</tr>
</table>
</div>
<div id="div3" style='display:none'>
<table>
<tr>
<td>div3
</td>
</tr>
</table>
</div>

이래저래 서핑해서 이 정보를 찾았는데, 테스트를 해 보니 맞는것 같기도 한데..
여분필드를 사용해서 입력을 하면 어떤식으로 바뀌어야할지를 모르겠네요..
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
19년 전 조회 1,609
19년 전 조회 1,401
19년 전 조회 1,760
19년 전 조회 1,667
19년 전 조회 1,524
19년 전 조회 1,574
19년 전 조회 1,417
19년 전 조회 1,733
19년 전 조회 1,522
19년 전 조회 1,265
19년 전 조회 1,511
19년 전 조회 1,572
19년 전 조회 1,754
19년 전 조회 1,433
19년 전 조회 1,725
19년 전 조회 1,520
19년 전 조회 1,518
19년 전 조회 1,548
19년 전 조회 1,674
19년 전 조회 1,621
🐛 버그신고