<head>
<script type="text/javascript”>
function ONOFF (id) {
ANS=document. getElementById(id);
switch (ANSWER.style.display) {
case “none” :
ANS.style.display="block”;
break;
case “block” :
ANS.style.display="none”;
break;
}
}
<head>
<html>
<div class="question” onClick="javascript:ONOFF(’install-006′)” onKeypress="javascript:ONOFF(’install-006′)”>
表示部分
</div>
<div id="install-006″ class="answer” style="display:none;” onClick="javascript:ONOFF(’install-006′)” onKeypress="javascript:ONOFF(’install-006′)”>
格納表示部分
</div>
</html></head></script></head>
Tags: javascript
