+ 3
How can I make text appear and disappear
For example if a condition is triggered it will print Score: 1 If its triggered again: Score: 2
5 ответов
+ 11
html
<div id='myDiv'>Some Text</div>
js
var myDiv=document.getElementById('myDiv');
to access the text simply use the innerHTML of the div:
myDiv.innerHTML = 'different text';
this will change the text
if you want to hide it however you can use
myDiv.style.visibility = 'hidden';
or
myDiv.style.visibility = 'visible';
https://www.w3schools.com/jsref/prop_style_visibility.asp
or you can use the style.display
myDiv.style.display = 'none';
check more valid options here:
https://www.w3schools.com/jsref/prop_style_display.asp
+ 7
no problems :)
+ 3
@Burey Thanks :D
+ 3
you can use blink tag in css
+ 3
How can we prove if we want to appear the words slowly . For example when i click a door , after the door opened the words shows off. Can you help me please?