JavaScript ?? ? ???? ???
JavaScript ?? ? ???? ???
?? ? ?? ???? ? ?? ??? ????? ? ?????.
?? ???
?? ???? ????? ??? ?? ??? ??? ???? ? ?????.
x=5? ?? ?? ???? ?? ???? ?? ?????.
?? ??
????? ?? ???? ???? ?? ??? ?? ??? ?? ??? ?? ? ????.
if (speed<180Km/h) document.write("?? ???");
? ????? ?? ???? ???? ?? ? ??? ?? ????.
?? ???
?? ???? ??? ? ??? ??? ???? ? ?????.
x=6 ? y=3? ? ?? ???? ?? ???? ?? ?????.
?? ???
JavaScript?? ?? ??? ?? ??? ?? ???? ?? ???? ???? ????.
Syntax
variablename=(condition)?value1:value2
Example
greeting=(visitor=="PRES")?"Dear President":"Dear";
?? Visitor? ?? "PRES"?? ?? Greeting? "Dear President" ?? ????, ??? ??? "Dear" ?? ?????.