Between the script tags, you need to make it so that the data is output (data) ... If you connect separately, then everything works, but I need to have ALL code in between ONE script tags ... Tell me why it doesn't work or HOW I do, so that all the code worked between the same script tags
<div id="placeholder"></div> <!--здесь НЕ выводит --> <script src="http://code.jquery.com/jquery-1.7.1.min.js"> var data={"firstName":"Ray"}; document.getElementById("placeholder").innerHTML=data.firstName; </script> <div id="placeholder"></div> <!-- и здесь НЕ выводит --> The code below is working, but does NOT meet the specified requirements.
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script> var data={"firstName":"Ray"}; document.getElementById("placeholder").innerText=data.firstName; </script> <div id="placeholder"></div>