直到我以这种方式筛选它currency:"+'"RUB"'+"
,脚本才将实现从标记传递到另一个脚本进行处理<a>
。
该脚本的文档说得很简单currency:'RUB'
。
尝试了一堆盾牌。And so '"
, and so ""
, and so ''
,通过连接得到他的版本,只有它有效。这种情况真的没有更好的屏蔽吗?
(不知何故,在我看来,这一切看起来很麻烦)
错误 - 当您单击“支付”时,这已经是脚本正确操作的结果,请勿将其投入流通。
function Change_value() {
var x = document.getElementById("item_select");
if (x.value == 'first_price') {
document.getElementById('Output').innerHTML = "<input name='sum' required='required' size='64' type='text' value='11000' class='input_field' readonly='readonly' style='background-color:#e0e0e0; color:#666666;'><br><br><a class='btn btn-xs btn-outline btn-primary' onclick='ipayCheckout({ amount:11000, currency:"+'"RUB"'+", order_number:0, description:0 }, function(order) { showSuccessfulPurchase(order) }, function(order) { showFailurefulPurchase(order) })'>Оплатить</a>";
//alert("x= "+x.value);
}
if (x.value == 'second_price') {
document.getElementById('Output').innerHTML = "<input name='sum' required='required' size='64' type='text' value='20200' class='input_field' readonly='readonly' style='background-color:#e0e0e0; color:#666666;'><br><br><a class='btn btn-xs btn-outline btn-primary' onclick='ipayCheckout({ amount:20200, currency:"+'"RUB"'+", order_number:0, description:0 }, function(order) { showSuccessfulPurchase(order) }, function(order) { showFailurefulPurchase(order) })'>Оплатить</a>";
//alert("x= "+x.value);
}
if (x.value == 'third_price') {
document.getElementById('Output').innerHTML = "<input name='sum' required='required' size='64' type='text' value='50400' class='input_field' readonly='readonly' style='background-color:#e0e0e0; color:#666666;'><br><br><a class='btn btn-xs btn-outline btn-primary' onclick='ipayCheckout({ amount:50400, currency:"+'"RUB"'+", order_number:0, description:0 }, function(order) { showSuccessfulPurchase(order) }, function(order) { showFailurefulPurchase(order) })'>Оплатить</a>";
//alert("x= "+x.value);
}
}
<form>Выберите услугу для оплаты<span style="color: red;">*</span><br />
<select required id="item_select" class="input_field" style="width: 308px;" onchange="Change_value()">
<option value="null" style="color: #000000;">выберите услугу для оплаты</option>
<option value="first_price" style="color: #000000;">первый ценник</option>
<option value="second_price" style="color: #000000;">второй ценник</option>
<option value="third_price" style="color: #000000;">третий ценник</option>
</select>
<br><br>
<div id="Output" style="display: inline;">
<input name="sum" readonly required="required" size="64" value="0" class="input_field" style="background-color: #e0e0e0; color: #666666;" type="text" /></div>
</form>
\"RUB\"
在这种情况下,而不是写"+'"RUB"'+"