4

だから私はエラーが発生し続けます:

employeesScript.js:3Uncaught SyntaxError: 予期しないトークン {.

何が原因なのかわからないので困っています。また、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;
});

});
4

1 に答える 1

11

fuctionスペルが間違っています。3行目にあるはずfunctionです。

于 2012-04-28T04:43:29.157 に答える