<分区>
Possible Duplicate:
javascript ? : notation
“?”是什么意思?运算符是什么意思?
标签 javascript
最佳答案
表示内联if
条件? true_statement : false_statement
例如
if(condition){
alert("true");
}else{
alert("false");
}
与 条件相同吗?警报(“真”):警报(“假”);
关于javascript - 简单的javascript问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3748017/