Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<script>
function findcode(codeToFind){
codeToFind=codeToFind.toLowerCase()
var searchThisString = document.documentElement.innerHTML.toLowerCase();
var numOccurrences = 0;
var currPos = 0;
while(currPos >= 0){
currPos = searchThisString.indexOf(codeToFind, currPos);
if(currPos >= 0){
numOccurrences++;
}
}
alert('Found ' + numOccurrences + ' of the string "' + codeToFind);
}
<html>
<head>
<title>Find Something</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
function findcode(codeToFind){
codeToFind=codeToFind.toLowerCase();
var searchThisString = document.documentElement.innerHTML.toLowerCase();
var numOccurrences = 0;
var currPos = 0;
var result = 0;
while(result >= 0){
result = searchThisString.indexOf(codeToFind, currPos);
currPos = result + 1;
alert(currPos);
if(currPos >= 0){
numOccurrences++;
}
}
alert('Found ' + numOccurrences + ' of the string "' + codeToFind);
}
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="#" onClick="findcode('table')">look</a></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>