Javascript – using getElementsByName() together with document.getElementById() or alternative approach?
I am trying to find all HTML tags with a specific name "name" inside an element with a specific id. document.getElementById("myid").getElementsByName("name"); throws error getElementsByName is not a function The sample code is: <!DOCTYPE html> <html> <body> <div id="myid"> <p name="name">first…