0

我有以下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。

我怎样才能正确重定向?

4

1 回答 1

1

尝试使用 window.location.href=

于 2012-04-06T07:26:08.123 回答