JavaScript – Multiple text does not change from block to block

  • Home / Blog / JavaScript – Multiple…

JavaScript – Multiple text does not change from block to block

I am currently trying to figure out how to make the text area disappear when another one appears instead.

I have no knowledge of JavaScript and I have just started learning the basics of HTML and CSS, is there any chance anyone from the forum can help me or maybe guide me on the right path ۔

I’m adding this part of the code to make it clearer.

When you click on “2.svg” it should change the display “Textarea.one’s and three’s”: block ؛ ” In “Display: None ؛”

When you click on “s.svg” it should change to “text.tvos” and the display: “block ؛” In “Display: None ؛”

When you click on “1.svg” it should change the display to “Textarea.two’s and three’s”: block ؛ ” In “Display: None ؛”

I hope this explanation is clear enough, I also don’t believe if I am allowed to provide full code on this forum without creating anything myself.

Thanks in advance to anyone who reads it!

<div>
      <img id="header1" src="/1.svg" alt="Open Menu" class="menu">
      <img id="header1" src="/2.svg" alt="Open Menu" class="menu">
      <img id="header1" src="/3.svg" alt="Open Menu" class="menu">
</div>

<div class="textniz">
  <textarea class="one" id="myInput" name="myInput" readonly>
Line one
Line two
Line three</textarea>
</div>

<div class="textniz">
  <textarea class="two" id="myInput" name="myInput" readonly>
Line four
Line five
Line six</textarea>
</div>

<div class="textniz">
  <textarea class="three" id="myInput" name="myInput" readonly>
Line seven
Line eight
Line nine</textarea>
</div>

Write a Comment

Your email address will not be published. Required fields are marked *

x