参数列表VM874:10后未捕获到的SyntaxError:缺少)

时间:2020-06-25 21:04:46

标签: javascript syntax-error

您能告诉我下面的代码有什么问题吗?

//this code below is showing an error
First.addEventListener("keyup", function(event) {
  // Number 13 is the "Enter" key on the keyboard
  if (event.keyCode === 13) {
    var input = document.getElementById("lastname")
 //i will change the class in function below that's why i am changing it back for some reason
     input.class === "margin5" ? input.class = "margin5 m-47" : console.log("false")
     input.value = "what ever value i want"
     changvaluE()
  }
}

1 个答案:

答案 0 :(得分:0)

重新格式化代码后,看来您缺少First.addEventListener(的结尾')'。