【Java script問題集】1-4 「1-3.」をボタン押下時に表示/非表示ができるように切り替えよう
1-4.html
<html>
<head>
<title>1-4</title>
</head>
<body>
<p>helloworld</p>
<button>botton</button>
$('button').click(function() {
$('p').toggle();
})
</script>
</body>
</html>
実行結果(ボタン押下前)
実行結果(ボタン押下後)