html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<button onclick ="hideshowj()" class="hideshow">
(Click here))Learning Javascript</button>
<div id="content">WOW, JavaScript is so confusing. especially the things i haven't gotten to yet.'</div>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
body {
}
#content{display:none
;
padding:5px;
background-color: maroon;
font-size:20px;
color: white;
border:1px solid blue
}
.hideshow{
padding:3px;
font-size:15px;
width:300px;
background-color: lime
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
function hideshowj(){
var x = document.getElementById("content");
if (x.style.display==="none")
{x.style.display="block";}
else{x.style.display="none";}
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run