Computer Science, asked by NISHARV4569, 1 year ago

Write a script that inputs several lines of text and a search character and uses string method indexof to determine the number of occurrences of the character in the text.

Answers

Answered by Anonymous
4
script that inputs several lines of text and a search character and uses string method indexof to determine the number of occurrences of the character in the text. is given below
.......






<!DOCTYPE html>




-------__------__. <html lang = "en">



<head>

<title>



Assignment3Q1 </title>



<meta charset = "utf-8">



<script type = "text



/javascript"



src = "CharacterOccurences.js">




</script> <link rel



= "stylesheet" type = "text/css" href = "CharacterOccurences.css"/>



</head> <body> <p>



_____________Enter some text:



<br> <textarea id = "searchString" rows = "4" cols = "55"></textarea> </p> <p>



Enter characters to search for: <br>



<input type = "text" id = "characters" size = "5"




/>



<input type = "button" id = "



searchButton" value = "



Search" onclick = "



getAllDomElement();"




/> </p> <p id = "output"



>



</p>


<.



/body>
Similar questions