【发布时间】:2017-01-16 12:54:38
【问题描述】:
我了解 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
}
【问题讨论】:
-
javascript 101 ...
if (!condition) { ... }
标签: javascript if-statement conditional-statements