2. getElementById
3. getElementsByTagName
4. getElementsByClassName
### 예제 ###
function view_type()
{
var type_A = document.getElementById('type_A');
var type_B = document.getElementById('type_B');
//alert(document.form.br_write_type.value);
if( document.form.br_write_type.value == "A" ){
type_A.style.display = "block";
type_B.style.display = "none";
}else{
type_A.style.display = "none";
type_B.style.display = "block";
}
}
< div id="type_A" style="display:<%=view_type_A %>;">
< textarea name="context" cols="20" rows="20" style="width:98%; height:300;"><%=context%>< /textarea>
< /div>
< div id="type_B" style="display:<%=view_type_A %>;">
< textarea name="context" cols="20" rows="20" style="width:98%; height:300;"><%=context%>< /textarea>
< /div>
Posted by 홍반장