javascript,ajax,表格,颜色

I wrote a bit of script to change the coulor of text on table rows based on a value. I am quite new to this so having some syntax issues. Can you see anything wrong with this:

 function ReturnValuesAsColor(Eval(online), Eval(mobile), Eval(server_proc)) {
    if  (online == -1){
        return "online";
    }else if (mobile == -1) {
        return "mobile";
    }else if (server_proc == -1){
        return "server_proc";
    }else 
        return;
    }};

thank you

ReturnValuesAsColor

It is convention to start a function name with a capital letter only if it is a constructor function, which this is not.

(Eval(online), Eval(mobile), Eval(server_proc))

Eval() is nonsense. Just put the variable names when you define your arguments.

function returnValuesAsColor(online, mobile, server_proc)