title: why is my script injection not working(xss)
body: <p>I am trying to inject a script to create an xss. 
  My html input tag look like:</p>
  
  <pre><code>&lt;div&gt;
      User name:
  &lt;/div&gt;
  &lt;div&gt;  
      &lt;input type="text" id="uname" onblur="unOut()"&gt;
  &lt;/div&gt;
  &lt;div id="unamewar" style="display:none;color:red; background-color:#ffe4b5"&gt;  
  &lt;/div&gt;
  </code></pre>
  
  <p>And my javascript looks like: </p>
  
  <pre><code>function unOut(){
      var x;
      x = document.getElementById("uname").value;
      if(x != ""){
          document.getElementById("unamewar").innerHTML = x;      
  }
  </code></pre>
  
  <p>So here when I try to inject a html tag say, "&lt; h1 > Hai &lt; /h1 >", it works as an html injection (i.e.)  'Hai' is displayed as a header in the div unamewar. But when I try the same with a script tag, for example, "&lt; script >alert("Hai);&lt; /script >",  it doesn't get executed. I would like to know how to inject a script as an xss in my code.</p>