We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0a6b48 commit 731c9f9Copy full SHA for 731c9f9
web/sources/captwords.js
@@ -0,0 +1,28 @@
1
+/**
2
+ This version of captwords() is usable in HTML 5.
3
+**/
4
+
5
+function captwords() {
6
+ var fs ="";
7
+ var elem = document.getElementById('capwords').value;
8
+ //alert(elem);
9
10
+ elem.split("<br>").forEach( function(line){
11
+ if(line !== "") {
12
+ var words = line.split(" ");
13
14
+ for(var i = 0; i < words.length; ++i){
15
+ var letter = words[i][0];
16
+ if(letter <= 'z'&& letter >= 'a'){
17
+ letter = String.fromCharCode(letter.charCodeAt()-32);
18
+ }
19
+ //alert("Caught: "+" \n "+letter+" in "+words[i]);
20
+ fs = fs + letter + words[i].substr(1) + " ";
21
22
23
+ fs = fs + "<br>";
24
25
+ });
26
27
+ document.getElementById("result").innerHTML="Results: "+"<br>"+fs;
28
+}
0 commit comments