如何检查文本框是否具有"x"类

Dhw*_*ani -2 html jquery

我的div里面有很多文本框.我只是想知道没有x类的文本框不是空的.我怎样才能做到这一点.

我试过了:

$("div.editorRow input").each(function () {
   //I want to check here if Textbox class is not x.
   if (!$(this).val()) {
   }
}
Run Code Online (Sandbox Code Playgroud)

请帮我.我不知道该怎么做.

mri*_*ida 6

尝试以下方法:

if(!$(this).hasClass('x')){
}
Run Code Online (Sandbox Code Playgroud)