Untitled
public html v1 · immutable<html><head><script type="text/javascript">function count(){var str=document.form1.text1.valuevar cnt=0var index=0while(index<str.length){if(str[index]=="a"||str[index]=="e"||str[index]=="i"||str[index]=="o"||str[index]=="u"){ cnt++ }index++}alert("no of vowels: "+ cnt)}</script></head><body><form name="form1" >Enter text<input type="text" name="text1"><input type="submit" onClick=count()></body></html>