div 内に多くのテキストボックスがあります。x
クラスのないテキストボックスが空ではないことを知りたいだけです。これどうやってするの。
私が試してみました:
$("div.editorRow input").each(function () {
//I want to check here if Textbox class is not x.
if (!$(this).val()) {
}
}
私を助けてください。これを行う方法がわかりません。
以下を試してください:
if(!$(this).hasClass('x')){
}
$("div.editorRow input").each(function () {
if (! (this.value && $(this).is('.x') ) {
// do stuff
}else{
// do other stuff
}
}
できるよ:
$("div.editorRow input:not(.x)").each(function () {
if (this.value == '') {
console.log("im empty!);
}
});