Html 按钮在同一地址上

Html 按钮在同一地址上,html,Html,我有以下html代码 gogu@yahoo.com wants to be your partner. Do you agree? <br><input type="button" id="1" name="btn1" class="button" value="Yes" onclick="window.location='confirm/gogu@yahoo.com';" /> <input type="button" id="2" name="bt

我有以下html代码

gogu@yahoo.com wants to be your partner. Do you agree? 
<br><input type="button" id="1" name="btn1" class="button" value="Yes"  onclick="window.location='confirm/gogu@yahoo.com';" />     
<input type="button" id="2" name="btn2" class="button" value="No"  onclick="window.location='decline/gogu@yahoo.com';" /> 
gogu@yahoo.com想成为你的搭档。你同意吗?

问题是当我点击“否”按钮时,它会让我进入同一个地址/gogu@yahoo.com.


如何正确重定向?

尝试使用window.location.href=

您在哪个浏览器中测试?Google Chrome和Internet Explorer我被难倒了。我刚刚创建了一个独立的.html文件,其中包含了您的代码,并做了一个JSFIDLE,两者似乎都能正确导航…:-(这是一个测试页面!