javascript - Using GET as method on HTML form is not appending to the URL? -


this question has answer here:

i have following form:

<form name="frmsearch" id="frmsearch" action="search_results.html" method="get">     <table>         <tr>             <td><input type="text" id="txtquery" placeholder="what hungry ?" required="true"></td>         </tr>         <tr>             <td><input type="text" id="txtlocation" placeholder="your location" required="true">         </tr>         <tr>             <td align="middle"><input type="submit"  placeholder="let's eat!" ></td>         </tr>     </table> </form> 

when click on 'let's eat' button(the submit button), url of new page launched not include values 2 input fields:

http://localhost:8000/search_results.html? 

why ?

your inputs need name attributes.