0

Can you guys write me a very basic javascript code?

I need a js code that will set p' s visibility value (css) to visible when they click a button that has the class of "button"?

9th Jan 2017, 12:38 PM
Alper
Alper - avatar
1 Answer
+ 8
HTML : <p>Hello</p> <button onclick="show()" id=btn>Show</button> CSS : p {visibility: hidden} JS : function show() { document.getElementsByTagName("p")[0].style.visibility = visible }
9th Jan 2017, 12:41 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar