la seguennte funzione a seconda di quali checkbox sono checked dovvrebbe mostrarmi il totale
Ho provato a farla in qiuesto modo
function Host()
{
var win=document.hosting.checked;
var lin=document.hosting2.checked;
var winlin=document.hosting3.checked;
var tot;
if (win && lin && winlin)
{
tot=win+lin+winlin;
return tot=105;
}
else if(win && lin)
{
tot=win+lin;
return tot=60;
}
else if(win && winlin)
{
$tot=win+winlin;
return tot=75;
}
else if(lin && winlin)
{
tot=lin+winlin;
return tot=75;
}
else if(win)
{
tot=win;
return tot=30;
}
else if(lin)
{
tot=win;
return tot=30;
}
else if(winlin)
{
tot=winlin;
return tot=45;
}
else
{
tot=0;
return tot=0;
}
document.write(tot);
}
grazie se qualcuno mi può aiutare