アウトラインの展開/縮小

日曜日 , 15, 3月 2009 Leave a comment

アウトラインの展開/縮小のJavaScriptの備忘録。
<div onmousedown="fpart1()" style="cursor:hand;">Part1</div>
<table id=part1 style="display:none" border=0>
<tr><td>contents1<BR>Hkey_users¥default¥control panel¥keybord//initialkeyboardIndicators=2</td></tr>
</table>
<div onmousedown="fpart2()" style="cursor:hand;">Part2</div>
<table id=part2 style="display:none" border=0>
<tr><td>contents2<BR></td></tr>
</table>
<script language="JavaScript">
function fpart1(){
if( part1.style.display == "none")
part1.style.display = "block";
else
part1.style.display = "none";}
function fpart2(){
if( part2.style.display == "none")
part2.style.display = "block";
else
part2.style.display = "none";}
</script>

Please give us your valuable comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です