Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/439.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用复选框启用PayPal按钮_Javascript_Html_Checkbox_Paypal_Payment - Fatal编程技术网

Javascript 使用复选框启用PayPal按钮

Javascript 使用复选框启用PayPal按钮,javascript,html,checkbox,paypal,payment,Javascript,Html,Checkbox,Paypal,Payment,说到编码,我有点不知所措,但现在开始了,希望有人能帮上忙。我被要求使用两个贝宝按钮设置付款页面。当您第一次到达页面时,按钮需要被禁用,直到他们选中复选框,这基本上意味着他们已经接受ToS,并且可以继续付款。我尝试了所有我能在网上找到的东西,但似乎没有什么对我有用 这是我的html代码 <!--CheckBox Validation--> <input id="one" type="checkbox" /> I have read and agree to

说到编码,我有点不知所措,但现在开始了,希望有人能帮上忙。我被要求使用两个贝宝按钮设置付款页面。当您第一次到达页面时,按钮需要被禁用,直到他们选中复选框,这基本上意味着他们已经接受ToS,并且可以继续付款。我尝试了所有我能在网上找到的东西,但似乎没有什么对我有用

这是我的html代码

    <!--CheckBox Validation-->

    <input id="one" type="checkbox" /> I have read and agree to the Terms &amp; Conditions


    <!--PayPal Button-->

    <center>
    <table>
<tr>
    <td>
    <form action="https://www.paypal.com/cgi-bin/webscr" onsubmit="return confSubmit();"              method="post" target="_top">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="2RU2ND26N2564">
    <input type="image" src="http://graphicasylum.com/images/Boton_100_Chico.png" border="0" name="submit" alt="PayPal, la forma más segura y rápida de pagar en línea.">
    <img alt="" border="0" src="https://www.paypalobjects.com/es_XC/i/scr/pixel.gif" width="1" height="1">
    </form>
    </td>

    <td>
<a class="submit disabled"
    <form action="https://www.paypal.com/cgi-bin/webscr" onsubmit="return confSubmit();" method="post" target="_top">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="SAK96Y5CBTFUL">
    <input type="image" src="http://graphicasylum.com/images/Boton_50_Chico.png" border="0" name="submit" alt="PayPal, la forma más segura y rápida de pagar en línea.">
    <img alt="" border="0" src="https://www.paypalobjects.com/es_XC/i/scr/pixel.gif" width="1" height="1"></a>
    </form>
    </td>
</tr>
    </table>
    </center>

我已阅读并同意条款&;条件

如果我完全迷路了(巫婆,我很确定我迷路了),我愿意走另一个方向来实现这一目标! 提前感谢您的帮助。:)我还不得不把我的两个paypal按钮放在表格中,因为这是我知道如何将它们并排放置在网页中央的唯一方法。

一眼就可以看到

if(!document.getElementById("one").checked) {

是的,我已经试过了,但是无论是否选中复选框,PayPal按钮仍然处于活动状态。
if(!document.getElementById("one").checked) {