Html 多项购物清单;输入类型为 submit returns 的表单元素仅返回列表中的最后一个表单元素

Html multiple-item shopping list; form element with input type submit returns back only the last form element from the list

我正在处理包含多个项目的购物清单,每个项目都有一个搜索栏和使用表单元素的提交按钮,但无论我在哪个项目上单击提交搜索,都只会出现最后一个项目。有任何想法吗?这是我的代码。非常感谢。

 <body>
 <!-- create your shopping list here! -->
 <form method="GET" action="https://www.amazon.com/s" target="_blank">
 <input name="k" value="Black Magic Pocket 6k pro"/>
 <input type="submit"/>
 <br/>
 <form method="GET" action="https://www.amazon.com/s" target="_blank">
 <input name="k" value="Les Paul Modern"/>
 <input type="submit"/>
 <br/>
 <form method="GET" action="https://www.amazon.com/s" target="_blank">
 <input name="k" value="Aputure Amaran 200d"/>
 <input type="submit"/>
 <br/>
 <form method="GET" action="https://www.amazon.com/s" target="_blank">
 <input name="k" value="Numchucks"/>
 <input type="submit"/>
 </form>
 </body>
 </html>

每次打开表单元素时都必须关闭它,我就是这样解决的。此外,完成后,换行符将是不必要的。

示例:

<html>
  <head>
    <title>My Shopping List</title>
  </head>
  <body>
    <form action="https://www.amazon.com/s" method="GET" target="_blank">
    <input name="k" value="lasagna"><input type="submit">
    </form>
    <form action="https://www.amazon.com/s" method="GET" target="_blank">
    <input name="k" value="Dr Pepper"><input type="submit">
    </form>
    <form action="https://www.amazon.com/s" method="GET" target="_blank">
    <input name="k" value="Ben and Jerry's"><input type="submit">
    </form>
  </body>
</html>