Avatar of Whing Dela Cruz
Whing Dela Cruz
Flag for Anguilla 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

<!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>

Open in new window

HTMLJavaASP

Avatar of undefined
Last Comment
Whing Dela Cruz

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Big Monty

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Whing Dela Cruz

ASKER
Thank you so much sir, its working!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck