You already have a thread on this topic!
if((document.getElementById('miles').value>=0)&&(document.getElementById('putime').value>=0||<=24) {
Use your error console to identify syntax errors! And inform the user what the problem is.
Code:
var milesTravelled = Number(document.getElementById("miles").value) || 0;
if ((milesTravelled < 1) || (milesTravelled > 200)) {
alert ("You must enter 1 - 200 miles");
document.getElementById("miles").focus();
return false;
}
var pickupTime = Number(document.getElementById("putime").value) || 0;
if ((pickupTime < 0) || (pickupTime > 23)) { // note the hours are 0-23. There is no 24 hour, midnight is 0 hours
alert ("The time must be 0-23 hours");
document.getElementById("putime").focus();
return false;
}
var cost = baseFare + (costPerMile * milesTravelled);
If I were you I would check the assignment to confirm that the extra night charge is supposed to be a flat $0.50 and not $0.50 per mile which is what I would expect.