<script type="text/javascript">
var str="this is my new tutorial";
document.getElementById("a2").innerHTML= str;
function create_array(){
var a1 = new Array();
a1=str.split(" ");
document.getElementById("a2").innerHTML= a1.join(" <br> ");
}
</script>
<br>
<input type=button value='Create Array' onClick='create_array()';>