'Programing/HTML/Css/Xml'에 해당되는 글 2건

  1. 2011.01.14 css 스타일을 사용한 간단한 롤오버 메뉴
  2. 2011.01.14 Dom을 사용한 HTML속성 컨트롤

<table width=200>
<tr>
<td onMouseover="this.style.backgroundColor='yellow'" onMouseout="this.style.backgroundColor='white'">첫번째 메뉴 입니다</td>
</tr>
<tr>
<td onMouseover="this.style.backgroundColor='yellow'" onMouseout="this.style.backgroundColor='white'">두첫번째 메뉴 입니다</td>
</tr>
</table>

'Programing > HTML/Css/Xml' 카테고리의 다른 글

Dom을 사용한 HTML속성 컨트롤  (0) 2011.01.14
Posted by kalkins
,
getAttribute()//HTML속성을 가져온다
gettAttribute()//HTML속성을 설정한다
removeAttribute()//HTML요소의 속성을 제거


<img id="myimage" src="http://www.jasko.co.kr/src/0000.gif">

<div id="mylayer" style="width:200px;height:30px;background-color:yellow">이
레이어의 배경색은 노랑색 입니다</div>

<script>
<!--
function checkSrc() { // myimage 의 src 속성을 리턴합니다
getSrc=document.getElementById("myimage").getAttribute("src")
(getSrc = 폼네임.id.src=" .jpg" 이런식으로 설정해도 된다 , id값은 유일해야함)
alert(getSrc);
}
function setSrc() { // myimage 의 src 속성을 변경합니다
document.getElementById("myimage").setAttribute("src","http://www.jasko.co.kr/src/0001.gif")
}
function reMove() { // mylayer 의 style 을 제거합니다
document.getElementById("mylayer").removeAttribute("style")
}
//-->
</script>

'Programing > HTML/Css/Xml' 카테고리의 다른 글

css 스타일을 사용한 간단한 롤오버 메뉴  (0) 2011.01.14
Posted by kalkins
,