Answer the question
In order to leave comments, you need to log in
How to remember in cookies?
Help to modify the code so that Java remembers cookies. Thanks
<script>
show.visible = '2';
show.hidden = '3';
function show(){
show.hidden = show.visible;
show.visible = (show.visible === '2')?'3':'2';
document.getElementById(show.visible).style.display = 'block';
document.getElementById(show.hidden).style.display = 'none';
}
</script>
<a href="#" onClick="show();">показать/скрыть</a>
<div id="2" style="display:block">
Скрытый текст1
</div>
<div id="3" style="display:none">
Скрытый текст2
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question