//add text after the last child
$("#btn1").click(function () {
$("#showBlock").after('hello');
});
//add text before the last child
$("#btn2").click(function () {
$("#showBlock").before('hello');
});
<body>
<!-- add new item Dynamically in the show block -->
<div id="showBlock">
Input:<input type="text" name="test[]" />
</div>
<!-- click the button to add new item -->
<input type="button" id="btn1" value="addtextLast"/>
<input type="button" id="btn2" value="addtextPre"/>
</body>