我正在尝试将贝宝的“添加到购物车”按钮从图像转换为常规按钮。
这是这段代码:
<form
target="paypal"
action="https://www.paypal.com/cgi-bin/webscr"
method="post"
>
<input type="hidden" name="cmd" value="_s-xclick" />
<input
type="hidden"
name="hosted_button_id"
value="XXXXXXX"
/><br />
<input
type="image"
src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_SM.gif"
border="0"
name="submit"
alt="PayPal - The safer, easier way to pay online!"
/>
<img
alt=""
border="0"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif"
width="1"
height="1"
/>
</form>
This is adding a paypal button using the linked .gif image, however when I change <input type="image"
to <input type="button"
and get rid of the src
, the functionality breaks and it no longer adds the item to the cart -- clicking on the button does nothing. Any help would be appreciated!
Change to a button that submits the form: