トップページ >  javascript >  ボタン表示非表示の切替
初版2008/04/14: 最終更新日2008/04/14
  ボタン表示非表示の切替
ボタン表示非表示の切替
ボタンを表示したり非表示にしたりするには、

document.getElementById("").style.visibility = "visible";
document.getElementById("").style.visibility = "hidden";
を使用します。

     




ソース
<html>
<head>
<title></title>
</head>
<body>
<input type="button" value="消すボタン" name="button1" onclick="a()">
<input type="button" value="消えるボタン" name="button2" >
<input type="button" value="戻すボタン" name="button3" onclick="b()">
<script language="JavaScript">
<!--
function a(){
    document.getElementById("2").style.visibility = "hidden";
}
function b(){
    document.getElementById("2").style.visibility = "visible";
}
// -->
</script>
</body></html>


Information

運営サイト
飲み会するならLINKS!!

美人メッセージ!
美人メッセージ!

サイト内検索
当サイト内を検索できます↓


PV

Contact
Skype Me?!

Other
Validate XHTML 1.1       Validate CSS