我理解if条件是如何工作的。像这样:
if (condition) {
block of code to be executed if the condition is true
}
但我如何反转,例如如果声明正确,不要触发这行代码?
if $("span:contains('399')) {
block of code to be executed if the condition is false
}
答案 0 :(得分:0)
if (!condition) {
block of code to be executed if the condition is false
}