Support » Fixing WordPress » help about Javascript – Math

• Resolved taghaboy

(@taghaboy)

hello,
if i’d like to know if a user select the number of days between 1 to 3 days the condition will be like this :numdays<=3
`if(nomdays<=3) { alert("you select a day between 1 to 3");}`

4 to 6 days is it numdays<=6 ????
7 to 13 days
14 to 20 days

thanks for help

Viewing 3 replies - 1 through 3 (of 3 total)
• taghaboy

(@taghaboy)

Any idea pls.

taghaboy

(@taghaboy)

is this possible for 4 to 6 days
`numdays>3 && numdays<6`
so
`if(numdays>3 && numdays<6) { alert("you select a day between 4 to 6");}`

?

taghaboy

(@taghaboy)

Find it
for 4 to 6 days
`numdays>3&&numdays<=6`

so, for actions :

``````if(nomjours<=3)
{
alert("you select a day between 1 to 3");
}

else if(nomjours>3&&nomjours<=6)
{
alert("you select a day between 4 to 6");
}

else if(nomjours>6&&nomjours<=13)
{
alert("you select a day between 7 to 13");
}

else if(nomjours>13&&nomjours<=20)
{
alert("you select a day between 14 to 20");
}

else
{
alert("you select a day more then 20");
}``````

Viewing 3 replies - 1 through 3 (of 3 total)
• The topic ‘help about Javascript – Math’ is closed to new replies.