title: How do I make a specific input trigger something?
body: <p>im trying to make a function that checks when a person inputs a number from 0 and 8 and then something happens that corresponds to that number. For example, the user inputs 5 and this makes it so a picture and text appear and if the person inputs 3 a different picture and text appear and etc. </p>
  
  <p>So far i have a forum where the person can enter a number but im stuck trying to figure out how to make these inputs trigger the action of show a picture and the text. </p>
  
  <pre><code>&lt;div id="Jupiter"&gt;
                  &lt;div class="pictures" &gt;
                      &lt;img src="img/Jupiter.gif"&gt;
                  &lt;/div&gt;
                      &lt;h1 class="title"&gt;Jupiter&lt;/h1&gt;
                      &lt;div class="paragraphs"&gt;&lt;p&gt; Jupiter is the fifth planet from the Sun and the largest in the Solar System. It is a giant planet with a mass one-thousandth that of the Sun, but two-and-a-half times that of all the other planets in the Solar System combined. Jupiter and Saturn are gas giants; the other two giant planets, Uranus and Neptune, are ice giants. Jupiter has been known to astronomers since antiquity.[17] It is named after the Roman god Jupiter.[18] When viewed from Earth, Jupiter can reach an apparent magnitude of −2.94, bright enough for its reflected light to cast shadows,[19] and making it on average the third-brightest natural object in the night sky after the Moon and Venus. &lt;br&gt;&lt;br&gt;Jupiter is primarily composed of hydrogen with a quarter of its mass being helium, though helium comprises only about a tenth of the number of molecules. It may also have a rocky core of heavier elements,[20] but like the other giant planets, Jupiter lacks a well-defined solid surface. Because of its rapid rotation, the planet's shape is that of an oblate spheroid (it has a slight but noticeable bulge around the equator). The outer atmosphere is visibly segregated into several bands at different latitudes, resulting in turbulence and storms along their interacting boundaries. A prominent result is the Great Red Spot, a giant storm that is known to have existed since at least the 17th century when it was first seen by telescope. Surrounding Jupiter is a faint planetary ring system and a powerful magnetosphere. Jupiter has 79 known moons,[21] including the four large Galilean moons discovered by Galileo Galilei in 1610. Ganymede, the largest of these, has a diameter greater than that of the planet Mercury.&lt;br&gt;&lt;br&gt;Jupiter has been explored on several occasions by robotic spacecraft, most notably during the early Pioneer and Voyager flyby missions and later by the Galileo orbiter. In late February 2007, Jupiter was visited by the New Horizons probe, which used Jupiter's gravity to increase its speed and bend its trajectory en route to Pluto. The latest probe to visit the planet is Juno, which entered into orbit around Jupiter on July 4, 2016.[22][23] Future targets for exploration in the Jupiter system include the probable ice-covered liquid ocean of its moon Europa.&lt;/p&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>So I want it to display this once a person types in the number "5"</p>
  
  <p>Here's my forum</p>
  
  <pre><code>&lt;fieldset&gt;
              &lt;legend&gt;Enter a Number between 0 and 9&lt;/legend&gt;
              &lt;p&gt;Number: &lt;input type="text" id="inputNumber" placeholder="Number" required&gt;&lt;/p&gt;
              &lt;p&gt;&lt;input type="submit" value="Enter" id="submit" /&gt;&lt;/p&gt;
          &lt;/fieldset&gt;
  </code></pre>
  
  <p>Here's the script</p>
  
  <pre><code>function displayPlanet(){
          var data = getElementbyId("submit").innerHTML;
          if(data == 5){
  
          }
      }
  </code></pre>
  
  <p>I understood how to get the function where I'm confused is how exactly do i make the div id Jupiter display. That was my original question, sorry for the misunderstanding.</p>