<form class="form1" action="https://google.com/search">
<input class="input1" type="text" name="q">
<input class="input2" type="submit" value="Google Search">
<input class="input2" type="submit" value="I'm feeling luckly">
</form>
就像在谷歌搜索中,我必须在两个按钮上同时按下两个按钮,但是我怎样才能为我感到幸运的按钮添加操作呢? 谢谢。
您可以将两个post表单路由到不同的链接:
<input class="input1" type="text" name="q">
<form class="form1" action="https://google.com/search">
<input class="input2" type="submit" value="Google Search">
</form>
<form class="form1" action="https://www.google.com/doodles/">
<input class="input2" type="submit" value="I'm feeling luckly">
</form>