title: How to use inline JavaScript in HTML?
body: <p>Support that I have this hidden field:</p>
  
  <pre><code>&lt;input type='hidden' id='handler' name='handler' value='5534882394' /&gt;
  </code></pre>
  
  <p>And imagine that I fetch an HTML fragment from server via jQuery AJAX.</p>
  
  <pre><code>&lt;div id='result'&gt;
      &lt;span&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However, instead of writing something like this:</p>
  
  <pre><code>$(function(){
     $('#result span').text($('#handler').val());
  });
  </code></pre>
  
  <p>I'd like to use something like:</p>
  
  <pre><code>&lt;div id='result'&gt;
      &lt;span&gt;javascript:$('#handler').val();&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However, I don't get the intended result. Can I use this approach with JavaScript?</p>
  
  <p><strong>Update:</strong> Everybody please, I know about <code>$(document).ready();</code>. So, don't provide better ways. I just wanted to know if it's possible to have inline JavaScript, or not, and if yeah, how?</p>