How do I populate the rest of the id tags with data in JavaScript -


i need help. currently, <p> tag has id="test". trying populate p tags variable originalstring. however, first <p> tag shown contain data. --> see image reference see image here.

how populate rest of p tags data.

            <script>                 var originalstring = ${entity.getgenresolr()};                 var genrelist = document.getelementbyid('test');                 genrelist.innerhtml = originalstring;                    </script>              <div class = "option_title_summary_rating">             <c:out value="rating of anime: ${entity.getratingssolr()} / 10 " /><br/>             <div class = "option_title_summary_summary">             <p id="test"></p>             </div> 

<script>     var originalstring = ${entity.getgenresolr()};     $("#test").text(originalstring);       </script>   <div class = "option_title_summary_rating">      <c:out value="rating of anime: ${entity.getratingssolr()} / 10 "  /> <br/>      <div class = "option_title_summary_summary">          <p id="test"></p>      </div> </div> 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -