您现在的位置是:首页 > 电脑技术查询 > web开发

跳出方法体,该怎么解决

编辑:chaxungu时间:2022-10-02 23:22:02分类:web开发

跳出方法体
if(firstF==secondF==thirdF==fourthF){
这里写什么?
}else{
alert( "提示错误... ");
}

------------------------------------
目的:firstF==secondF==thirdF==fourthF 条件成立后跳出这个判断;

------解决方案--------------------
if(firstF==secondF==thirdF==fourthF){
return false;
}else{
alert( "提示错误... ");
}
------解决方案--------------------
function chang()
{
if(1==1==1==1){
return false;
}else{
alert( "提示错误... ");
}
}


不会啊,
or


function chang()
{
if(!(1==1==1==1)){
alert( "提示错误... ");
return false;
}else{
alert( "dddd ");
}
}