我想在alert框中确认两个不同的事情,如果语句。首先是用户按下了“是”按钮,第二个是用户在页面上的输入值。请参阅下面的代码。我仍然非常绿色,任何帮助将不胜感激。如果语句和条件
var cMsg = "You are about to reset this page!";
cMsg += "\n\nDo you want to continue?";
var nRtn = app.alert(cMsg,2,2,"Question Alert Box");
if(nRtn == 4) && (getField("MV").value == 5)
{
////// do this
}
else if(nRtn == 4) && (getField("MV").value == 6)
{
/////then do this
}
else if(nRtn == 4) && (getField("MV").value == 7)
{
/////then do this
}
}
else if(nRtn == 3)
{
console.println("Abort the submit operation");
}
else
{ //Unknown Response
console.println("The Response Was somthing other than Yes/No: " + nRtn);
}
您的问题是? – Teemu 2015-02-06 05:16:14
不正确的语法首先更正,使用'if((nRtn == 4)&&(getField(“MV”)。value == 5))'如果语法是'if(condition)....' – Satpal 2015-02-06 05:16:29
@Satpal这就是我在找什么......谢谢 – 2015-02-06 06:51:36