Whing Dela Cruz
asked on
Html split(text)
Hi experts, I wish to read the text inside input and write it on innerHTML separately by way of slash "/" that the result would something like below. Is this possible? Please help.
Whing
Delacruz
88
22
Whing
Delacruz
88
22
<!DOCTYPE html>
<html>
<body>
<input type="text" id="ii" value="Whing/Delacruz/88/22">
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var str = document.getElementById("ii").value;
var res = str.split...
document.getElementById("demo").innerHTML = res;
}
</script>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER