Code:
<html>
<head>
<title> To count Vowels </title>
</head>
<body>
<form name = "f1">
<h1> Enter the string whose vowel is to be counted </h1>
<input type ="text" name = "t1">
<input type = "button" name = "btn_checkVowel" value = "Click to Count" onClick="count()">
</form>
<script type = "text/javascript">
function count()
{
var i,ch,str,counter=0;
str = [Link];
for (i=0;i<[Link];i++)
{
ch=[Link](i);
if (ch=="A"||ch=="a"||ch=="E"||ch=="e"||ch=="I"||ch=="i"||ch=="O"||ch=="o"||
ch=="U" || ch=="u")
counter++;
}
alert ("Number of Vowels in the Entered String are:"+counter);
}
</script>
</body>
</html>
Out Put: