<div class="htmlarea"> <textarea id="runcode72169"> <title> 새 문서 </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <style type="text/css"> <!-- .li01 { background:#FFF; } .li02 { background:#eeeeee; } --> </style> <div><ul id="list01"> <li class="title"><a href="#">제목</a></li> <li><a href="#">111</a></li> <li><a href="#">222</a></li> <li><a href="#">333</a></li> <li><a href="#">444</a></li> <li><a href="#">555</a></li> <li><a href="#">666</a></li> </ul></div> </textarea> <br><input onclick="runEx('runcode72169')" type="button" value="运行代码"><input onclick="doCopy('runcode72169')" type="button" value="复制代码"> <input onclick="doSave(runcode72169)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A 모두 선택 참고: </a>외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다. </div>]<br><script language="Javascript"> objName=document.getElementById("list01").getElementsByTagName("li") for (i=0;i<objName.length;i++) { (i%2==0)?(objName(i).className = "li01"):(objName(i).className = "li02"); } </script>