I have a Text Box which i wish to Place Words into it, once i click the Button it should Split the Words into Characters
E.G
I enter Before in Text box it should Should
B
E
F
O
R
E
Code:
<script language="javascript">
function getTag(){
var string = document.getElementById("tag");
var array = string.getElementById("tag");
var finishedArray = [];
for (var i = 0, il = array.length; i < il; i++) {
var temp = array[i].getElementById(",");
for (var j, jl = temp.length; i < jl; j++) {
finishedArray.push(temp[j]);
destLayer = document.getElementById('splitResponse');
destLayer.innerHTML='';
}
}
}
</script>
<h3>Sentence Splitter</h3>
<input name="tag" type="text" id="tag" size="30" autocomplete="off"/>
<button onClick="getTag();" value="Click"/>Click</button>
<div id="splitResponse"></div>
<div class="section"></div>
</div>