As someone new to JS, I'm reaching out after spending a couple of hours searching for a solution (it's currently 3:00am and I'm desperate to get some sleep). So, your help is greatly appreciated.
My goal is to locate the child node within a div tag named txtPhone and then trigger an alert with that name.
<div class="formfield">
<input id="txtPhone" name="txtPhone" />
Therefore:
alert(document.getElementsByTagName("div")...?);
Thank you very much!