有人可以告诉我为什么这些代码不能链接到页面吗?
<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>
均无效。说找不到页面。
答案 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>