为什么捐赠按钮会在其上方显示空间?

时间:2015-03-17 08:04:57

标签: html

我在website上使用以下捐赠按钮,似乎占用了大量空间。请告诉我为什么会这样。

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="bla@bla.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Naya Jeevan Foundation">
<input type="hidden" name="item_number" value="26-0551721">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.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>

感谢。

4 个答案:

答案 0 :(得分:1)

请尝试输入:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"><input type="hidden" name="cmd" value="_donations"><input type="hidden" name="business" value="bla@bla.com"><input type="hidden" name="lc" value="US"><input type="hidden" name="item_name" value="Naya Jeevan Foundation"><input type="hidden" name="item_number" value="26-0551721"><input type="hidden" name="no_note" value="0"><input type="hidden" name="currency_code" value="USD"><input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest"><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.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>

答案 1 :(得分:0)

这是因为有许多<br>标签

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_donations">
    <br>
    <input type="hidden" name="business" value="nayajeevan@njfk.org">
    <br>
    <input type="hidden" name="lc" value="US">
    <br>
    <input type="hidden" name="item_name" value="Naya Jeevan Foundation">
    <br>
    <input type="hidden" name="item_number" value="26-0551721">
    <br>
    <input type="hidden" name="no_note" value="0">
    <br>
    <input type="hidden" name="currency_code" value="USD">
    <br>
    <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
    <br>
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <br>
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
    <br>
</form>

答案 2 :(得分:0)

http://www.inspuratesystems.com/nayajeevan/?page_id=3377

我检查了你的网址,发现你已经放了&#39; br&#39;所有输入hiddens之后的标记。 删除&#39; br&#39;标签。捐赠按钮将自动显示在顶部。

答案 3 :(得分:0)

当您在WordPress文本编辑器中放置代码时,它需要一个新行作为

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="bla@bla.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Naya Jeevan Foundation">
<input type="hidden" name="item_number" value="26-0551721">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.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>

变为

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<br>
<input type="hidden" name="cmd" value="_donations">
<br>
<input type="hidden" name="business" value="bla@bla.com">
<br>
<input type="hidden" name="lc" value="US">
<br>
<input type="hidden" name="item_name" value="Naya Jeevan Foundation">
<br>
<input type="hidden" name="item_number" value="26-0551721">
<br>
<input type="hidden" name="no_note" value="0">
<br>
<input type="hidden" name="currency_code" value="USD">
<br>
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<br>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<br>
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<br>
</form>

要避免这种情况,请从代码中删除所有新行。