target to a div without reloading the page in javascript
<p>i wrote a web page that included some stuff. There, i need to create a  input text box after clicking on a button, but it will be at the bottom due to existing stuff and i can't see the input box as it is in the out of visible area.there i'v to scroll down to find that.I tried with focus method , it focuses to the input box, it is unable to take the input box to visible area.in the top , i'v some javascript stuff .so i need to do this without refreshing.Here is the code snippet i'v tried. </p>

<pre><code>&lt;script&gt;

function create(){
var inputBox=document.createElement('input');
inputBox.setAttribute('id','myInput');
var body=document.getElementsByTagName('body')[0]; 
body.appendChild(inputBox);
document.getElementById('myInput').focus();
}
&lt;/script&gt;

&lt;body&gt;

&lt;button onclick="create()"&gt;Click me&lt;/button&gt;


&lt;/body&gt;
</code></pre>

<p>Can anyone help me !</p>
