
22 ◾ PhoneGap Build
<input type = "button" id = "sendButton" value = "Send">
<div id = info></div>
</form>
</body>
</html>
We can see that the getElementsByTagName() method is used to access all the HTML
elements with the input tag name. e method returns an HTMLCollection object that is
assigned to the ElementsArray. It means that the ElementsArray contains all the HTML
elements of the index.html file. Two strings, selectedContact and selectedTemplate,
are defined to store the selected template and the contact names, respectively. Using a for loop, each
HTML element in the ElementsArray is accessed and tested. If the HTML element is a check