Link to home
Start Free TrialLog in
Avatar of Whing Dela Cruz
Whing Dela CruzFlag for Anguilla

asked on

Count the slush

Hi experts, I want to count number of slushes in the input text. Any help please!

<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>

<input type="text" id="T1" value="Dog/Cat/Chicken//">
<button onclick="return iCount()">Count slush</button>

<script>
function iCount()
{
  var X = document.getElementById("T1").value;
  alert() //Count the slushes on the input text, T1 
}

</script>


</body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Leonidas Dosas
Leonidas Dosas
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Whing Dela Cruz

ASKER

Thank you sirs, all are the best! More power to both of you.