<div id="screen[index]" > 
    <button  class="btn btn-success" onclick="nextscreen();">next</button><button  class="btn btn-success" onclick="prevscreen();">cancel</button>
    <p>This is screen [index]</p>
    <input type="text">
</div>
<div id="screen[index]a" > 

</div>