我有一个订单表单脚本,其中有一个函数说明如果作业将花费比x更长的时间刷新消息。脚本工作正常,如果我离开我的if语句,但如果我把它放在它只执行,如果X变量符合if条件,这是否有意义?做如果语句执行后停止代码?
我的脚本...
if (EstimatedCoreHours >= 50000)
{
document.getElementById("AccountManagement").innerHTML='You have a big Job on your hands - Contact Us!';
document.getElementById("AccountManagement").style.backgroundColor="yellow";
}
else
{
document.getElementById("AccountManagement").innerHTML='';
document.getElementById("ContBtn").style.display="";
}
if (EstimatedCoreHours >= 100000)
{
document.getElementById("LeadTimes").innerHTML='5 Business Days!';
document.getElementById("LeadTimes").style.backgroundColor="yellow";
}
else if (EstimatedCoreHours >=25000)
{
document.getElementById("LeadTimes").innerHTML='2 Days';
document.getElementById("LeadTimes").style.backgroundColor="yellow";
}
else
{
document.getElementById("LeadTimes").innerHTML='Right Away';
document.getElementById("LeadTimes").style.backgroundColor="yellow";
}
请重新说明... – Eineki 2011-05-25 09:44:23