gpt4 book ai didi

javascript - 困惑 } jquery 错误

转载 作者:搜寻专家 更新时间:2023-11-01 04:58:11 25 4
gpt4 key购买 nike

所以我不断收到错误:

employeesScript.js:3Uncaught SyntaxError: Unexpected token {.

这让我抓狂,因为我不知道是什么原因造成的。我还通过 JSFiddle 运行它并得到以下错误:

Error:
Problem at line 3 character 50: Expected ')' and instead saw '{'.
$(".employeesPostHours").live("click", fuction() {

Problem at line 3 character 51: Missing semicolon.
$(".employeesPostHours").live("click", fuction() {

Problem at line 45 character 1: Expected '(end)' and instead saw '}'.
});

Implied global: $ 1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20, fuction 3, employeeEntry 5,6,7,8,9,10,11,12,13, employeesId 6,23, employeesEmail 7,24, employeesStartTime 8,25, employeesEndTime 9,26, employeesDate 10,27, employeesExtraMoney 11,28, employeesExtraMoneyDetail 12,29, driving 13,30, onTruck 14,31, warehouse 15,32, phones 16,33, flyering 17,34, wageChange 18,35, alert 38

这是我的 Jquery:

$(document).ready(function(){

$(".employeesPostHours").live("click", fuction() {
$("#employeesSection1Form").append("Please Wait...");
employeeEntry = $(this).closest("div");
employeesId = $(employeeEntry).find("#employeesId").val();
employeesEmail = $(employeeEntry).find("#employeesEmail").val();
employeesStartTime = $(employeeEntry).find("#employeesStartTime").val();
employeesEndTime = $(employeeEntry).find("#employeesEndTime").val();
employeesDate = $(employeeEntry).find("#employeesDate").val();
employeesExtraMoney = $(employeeEntry).find("#employeesExtraMoney").val();
employeesExtraMoneyDetail = $(employeeEntry).find("#employeesExtraMoneyDetail").val();
driving = $(employeeEntry).find("#driving").val();
onTruck = $(onTruck).find("#onTruck").val();
warehouse = $(warehouse).find("#warehouse").val();
phones = $(phones).find("#phones").val();
flyering = $(flyering).find("#flyering").val();
wageChange = $(wageChange).find("#wageChange").val();

$.post(
'employeesHoursPost.php',
{
'employeesId': employeesId,
'employeesEmail': employeesEmail,
'employeesStartTime': employeesStartTime,
'employeesEndTime': employeesEndTime,
'employeesDate': employeesDate,
'employeesExtraMoney': employeesExtraMoney,
'employeesExtraMoneyDetail': employeesExtraMoneyDetail,
'driving': driving,
'onTruck': onTruck,
'warehouse': warehouse,
'phones': phones,
'flyering': flyering,
'wageChange': wageChange
},
function (response) {
alert (response);
}
);
return false;
});

});

最佳答案

function 拼写错误。它应该是第 3 行的 function

关于javascript - 困惑 } jquery 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10360648/

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