Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of ${} in javascript

I need to work on javascript lately. Unfortunately, I am a newbie.
I have come across the following code and don't understand the meaning of ${count == 0}.

function body_onload()
{
    if(${count == 0})
    {
        document.getElementById("dispaly").style.display="none";
    }   
    scanImageReportFrom.shopCodes.focus();
}

Thank you.


Finally I found this that can solve my question.

like image 254
Johnny Avatar asked Dec 26 '22 00:12

Johnny


1 Answers

It's not you. :-) That's not valid JavaScript (the { triggers a syntax error).

It could perhaps be a token for some pre-processor that replaces it with something before the JavaScript is passed to the JavaScript engine.

like image 198
T.J. Crowder Avatar answered Dec 30 '22 11:12

T.J. Crowder