title: how to display variable value in alert box?
body: <p>I wanted to display variable value in alert box.</p>
  
  <p>please see below code : </p>
  
  <pre><code>&lt;script&gt;
      function check() {
          var content = document.getElementById("one").value;
          alert(content);
      }
  &lt;/script&gt;
  &lt;body onload="check()"&gt;
      &lt;div style="position: absolute; z-index: 9; width: 450px; top: 38px; margin-left: 176px;"&gt;
          &lt;style&gt;
              div#layout {
                  margin:0px;
                  padding:px;
                  width:450px;
                  margin:0px auto;
                  overflow:hidden;
              }
          &lt;/style&gt;
          &lt;div id="layout"&gt;
               &lt;span id="one" style="display:none" ph="layout1" class="ione"&gt;yes&lt;/span&gt;    
               &lt;span id="two" style="display:none" ph="layout1" class="ione"&gt;no&lt;/span&gt;    
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>When i am executing this code then it is showing value as undefined in alert box.
  value in span id"one"is changing in different different situation.
  i want to track every time...so i cant hardcode it.</p>
  
  <p>can you please help in this?</p>