gpt4 book ai didi

javascript - 如何从 javascript 更改 Paypal 金额值?

转载 作者:太空宇宙 更新时间:2023-11-03 16:01:20 25 4
gpt4 key购买 nike

我有一个计算总计的函数,如何使用 javascript 将数据量的值更改为总计?

 <script data-env="sandbox"
data-currency="NZD"
data-button="buynow" src="https://www.paypalobjects.com/js/external/paypal-button.min.js?merchant=test@test.com"
async="async"
data-amount="0">

</script>

任何帮助都会很棒

最佳答案

如果你的意思是data-amount...

var scr=document.getElementsByTagName("script")[0]; // assuming that this <script> is first <script> on this page
scr.setAttribute("data-amount", "some new value");

关于javascript - 如何从 javascript 更改 Paypal 金额值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26788946/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com