javascript - 如何动态更改 PayPal 货币代码
问题描述
我试图在 PayPal SDK 中动态更改货币代码,但被堆叠了。当用户点击货币下拉菜单时,它会自动更改货币的占位符。
下拉代码
<span class="input-group-text bg-white border-right-0">
<select class="form-select form-select-lg border-0 " width="3px" id="currency" aria-label=".form-
select-lg example">
<option value="USD" selected>USD</option>
<<option value="AUD">AUD</option>
</select>
</span>
脚本
<script type="text/javascript">
var currency = document.getElementById("currency").value;
</script>
<script src="https://www.paypal.com/sdk/js?client-id=secret¤cy=currency"></script>
解决方案
推荐阅读
- firebase - Firebase 查询或报告
- mitmproxy - 是否可以检查 mitm-certificate 是否安装在插件中?
- dictionary - 合并/合并顶级字典
- servicenow - ServiceNow:从 DataTable Widget 访问 sys_id 字段
- mysql - 按当前日期在仪表板中显示值
- python - Pandas 自定义指数衰减
- python - 在python中使用子进程调用R文件
- types - Rust 中商环类型的编译时间检查
- php - 刷新页面时谷歌翻译无法工作 3-5 秒
- javascript - 从threejs对象拖动fabricjs对象