How to change the order of Div when we send value from textbox, when we click on send button the textbox value goes into div but the order is top but if we want to change the order .... can is it...

<div id="msgtxttt" style="width:200px;background-color:silver;height:200px;"></div> 
</br> 
<input id="msgtxt" type="text" />
</br> 
<span id="searchbtn" style="cursor:pointer;" onclick="send();">Send</span>



 <script type="text/javascript"> 

function send(){ var txt = $.trim($('#msgtxt').val());
 var box = $("#msgtxttt").html();
 if(box!="")
  {
      $("#msgtxttt").html(box +"<br />" +txt);
  } 
  else
       $("#msgtxttt").html(txt);
       $('#msgtxt').val(""); 
  } 

</script>

Related posts

Recent Viewed