这似乎不起作用我不确定如何让这个 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()