Uncaught ReferenceError: JQuery is not defined at (index):23
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
</head>
<body>
<form method="post" action="#">
<input type="text" name="producer" class="producerField" placeholder="Производитель">
<input type="text" name="name" class="nameField" placeholder="Наименование">
<input type="text" name="price" class="priceField" placeholder="Цена">
<input type="text" name="amount" class="amountField" placeholder="Количество">
<input type="submit" value="Добавить" class="button">
</form>
<table class="row" style="border:2px solid silver">
</table>
<script>
JQuery(document).ready(function() {
JQuery(".button").bind("click", function() {
var producer = JQuery('.producerField').val();
var name = JQuery('.nameField').val();
var price = JQuery('.priceField').val();
var amount = JQuery('.amountField').val();
JQuery('.producerField').val('');
JQuery('.nameField').val('');
JQuery('.priceField').val('');
JQuery('.amountField').val('');
JQuery.ajax({
url: "data.php",
type: "POST",
data: {producer:producer, name:name, price:price, amount:amount},
dataType: "json",
success: function(result) {
if (result){
JQuery('.rows').append(function(){
var res = '';
for(var i = 0; i < result.products.producer.length; i++){
res += '<tr><td>' + result.product.producer[i] + '</td><td>' + result.product.name[i] + '</td><td>' + result.product.price[i] + '</td><td>' + result.product.amount[i] +
'</td><tr>';
}
return res;
});
console.log(result);
}else{
alert(result.message);
}
return false;
}
});
return false
});
});
</script>
</body>
</html>