指向贝宝捐赠基金的HTML按钮不起作用

时间:2018-12-05 12:45:07

标签: html paypal

有人可以告诉我为什么这些代码不能链接到页面吗?

<form><input class=”MyButton” type=”button” value=”PayPal Giving Fund”   onclick=”window.location.href=’paypal.com/us/fundraiser/charity/1521457//button- links.php'” /></form>

我也尝试过

<form><input class="MyButton" type="button" value="PayPal Giving Fund" onclick="window.location.href='htpps://www.paypal.com/us/fundraiser/charity/1521457/button-links.php'" /></form>

均无效。说找不到页面。

1 个答案:

答案 0 :(得分:1)

尝试一下 您在“ htpps”中有错字,也使用表单的操作参数代替了onclick,这意味着这样做

<form action='https://www.paypal.com/us/fundraiser/charity/1521457/button-links.php'>
    <input class="MyButton" type="submit" value="PayPal Giving Fund">
</form>