태환님께서 올리신글 : http://cafe.naver.com/foster.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=93
<소스보기>
<HTML><HEAD>
<TITLE> innertext와 innerhtml</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function texttest(){
//m이라는 marquee개체의 innerText속성에"
document.all.m.innerText="<font color=\"red\">월드컵코리아</font>";
}
function htmltest(){
document.all.m.innerHTML="<font color=\"red\">월드컵코리아</font>";
}
function control(v){
document.all.m.direction=v;
}
//-->
</SCRIPT></HEAD>
<BODY>
<marquee width="450" height="400" style="background-Color:yellow;colord:red" direction="down" Scrolldelay=30 id="m"> 마퀴태구.. </marquee><p>
<span style="cursor:hand" Onclick="texttest()">[innerText]</span>
<span style="cursor:hand" Onclick="htmltest()">[innerHTML]</span><p>
<span style="cursor:hand; border-style:solid; border-width:1px; background-Color:#cccccc; padding:10px" Onclick="control(this.innerText)">up</span>
<span style="cursor:hand; border-style:solid; border-width:1px; background-Color:#cccccc; padding:5px" Onclick="control(this.innerText)">down</span>
<span style="cursor:hand; border-style:solid; border-width:1px; background-Color:#cccccc; padding:5px" Onclick="control(this.innerText)">left</span>
<span style="cursor:hand; border-style:solid; border-width:1px; background-Color:#cccccc; padding:5px" Onclick="control(this.innerText)">right</span>
</BODY>
</HTML>