간단하긴 하지만 너무 자주 쓴다...
그냥 C&P의 생활화가 편해~
<td class="item_nl">
<span id='u_list' style="display;">
<html:select property="프로퍼티명">
<html:optionsCollection name ="ABC" property="values" value="key" label="value"/>
</html:select>
</span>
<br>
바꿔!<input type="checkbox" checked onclick="Change(this);"/>
<span id='u_text' style="display:none;">
<html:text property="프로퍼티명" size="25"/>
</span>
</td>
---------------------------------------------------------------------------------------------------
.js
function Change( objTarget){
var sobj = document.getElementById('u_list');
var tobj = document.getElementById('u_text');
if( objTarget.checked == true ) {
sobj.style.display = 'none';
tobj.style.display = '';
} else {
sobj.style.display = '';
tobj.style.display = 'none';
}
}
-----------------------------------------------------------------------------------------------------
iterate로 받아오는것은 id도 배열식으로 지정하면 되니깐 알아서 값 잘 넘겨받아서 처리하믄 됨!