4
私のコードは、(jsfiddleでも利用可能)以下の通りです:なぜjslintが私に叫ぶのですか?
$button = $('<button />', {
text: 'my button',
class: 'button'
});
jslintエラーメッセージは次のとおりです。
Problem at line 3 character 5: Expected an identifier and instead saw 'class' (a reserved word).
class: 'button'
classは予約済みのキーワードだと不平を言っているので、それを使用するにはキーワードと区別するために引用符が必要な場合があります。しかし、わからない... –