.innerHTML problems storing it into a variable
Here is my code that is not working - thanks guys - first question!

    <html>
    <head>
    <script type="text/javascript">
    var x =document.getElementById("myElementId").innerHTML;


    </script>

    </head>

    <body>
    <div id="myElementId">24</div>
    <div>

    <script type="text/javascript">
    if (x < 25) {
    document.write("worked")
    }
    else {
    document.write("didn't work")
    }
    </script>
   </div>

   </body>
   </html>
.innerHTML problems storing it into a variable
===

Here is my code that is not working - thanks guys - first question!

    <html>
    <head>
    <script type="text/javascript">
    var x =document.getElementById("myElementId").innerHTML;


    </script>

    </head>

    <body>
    <div id="myElementId">24</div>
    <div>

    <script type="text/javascript">
    if (x < 25) {
    document.write("worked")
    }
    else {
    document.write("didn't work")
    }
    </script>
   </div>

   </body>
   </html>