我收到错误:无法通过引用传递参数2 .....
在这一行......
$stmt1->bindParam(':value', $_SESSION['quantity'.$i] * $_SESSION['price'.$i], PDO::PARAM_STR);
Run Code Online (Sandbox Code Playgroud)
上面的代码有什么问题?
我有一个ID为#country的国家/地区下拉列表。我试图将作为ajax请求选择的值传递给php文件-countrycode.php,并将接收到的值传递给ID为#tele的另一个输入字段。我的代码如下:
<script>
$('#country').change(function() {
//var country = $(this).val();
var country = $('#country').val();
//alert(country);
});
$.ajax({
type: "POST",
url: 'countrycode.php',
data: { country : country },
success: function(data)
{
$("#tele").html(data);
}
});
</script>
Run Code Online (Sandbox Code Playgroud)
警报(国家);显示正确的所选国家。我尝试使用:
var country = $(this).val();
Run Code Online (Sandbox Code Playgroud)
也带有正确的警报消息。
问题在于:
data: { country : country },
Run Code Online (Sandbox Code Playgroud)
我收到错误:TypeError:'stepUp'在未实现接口HTMLInputElement的对象上调用
我尝试了Stackoverflow ..中的所有答案,但是不明白为什么它不起作用?