Answer the question
In order to leave comments, you need to log in
How to make text change show/hide?
Here is the code:
<a href="#" onclick="openbox('info_zadaniya'); return false">Показать</a>
<div id="info_zadaniya" style="display: none;">
здесь текст
</div>
function openbox(id){
display = document.getElementById(id).style.display;
if(display=='none'){
document.getElementById(id).style.display='block';
} else{
document.getElementById(id).style.display='none';
}
}
Answer the question
In order to leave comments, you need to log in
You need to refer to your link, change its text property, just like you change the display style.
https://codepen.io/DmitryShade/pen/MVbKyz
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question