Check no.of vowels in javascript and html
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script language="javascript" type="text/javascript"> function check() { var str =document.getElementById("textboxing").value; var chr = "" var nVowels = 0 //Counting all the vowels except y. for (pos = 0; pos < str.length; pos++) { chr = str.charAt(pos); if (chr == "a" || chr == "e" || chr == "i" || chr == "o" || chr == "u" || chr == "A" || chr == "E" || chr == "I" || chr == "O" || chr == "U") ...
Comments
Post a Comment