这似乎并不奏效,我不知道如何得到这个while循环正常工作的任何帮助,将不胜感激。while循环不与正常工作>标记
function getProductCode() {
productCode = parseInt(prompt("Enter Product Code: "));
while (productCode < 1 || > 9999)
{
document.writeln("Error! the product Code must be between 1 - 9999");
parseInt(prompt("Enter Product Code: "));
}
return productCode
}
getProductCode()
什么是 “工作不正常”?发生了什么以及你期望发生什么? – 2012-07-07 13:51:59
以及< 1 || > 9999位如果你检查Web控制台它说>是一个意外的令牌为什么? – thechrishaddad 2012-07-07 13:54:17