title: how can i print value of input text type id in javascript
body: <pre><code>&lt;input type=text name=input id="in1" value=1 onclick=inputs()&gt;
  &lt;input type=text name=input id="in2" value=2 onclick=inputs()&gt;
  &lt;input type=text name=input id="in3" value=3 onclick=inputs()&gt;
  &lt;input type=text name=input id="in4" value=4 onclick=inputs()&gt;
  &lt;script type=text/javascript&gt;
  function inputs()
  {
  var val=document.getElementById();
  document.write(val);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Actually, i want only onclick's input id in variable val. please help me.</p>