javascript - getElements 시리즈

1. getElementsByName



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>
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2009/01/14 16:58 2009/01/14 16:58
Response
No Trackback , 2 Comments
RSS :
http://tcbs17.cafe24.com/tc/rss/response/3880

Trackback URL : http://tcbs17.cafe24.com/tc/trackback/3880

« Previous : 1 : ... 447 : 448 : 449 : 450 : 451 : 452 : 453 : 454 : 455 : ... 1009 : Next »

블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2024/11   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Statistics Graph

Site Stats

Total hits:
244757
Today:
35
Yesterday:
1073