what I know are theese commands:
PHP Code:
document.write(x); - for writing value or word. variable also possible.
if... else statements and maybe more....
BUT,
What is that and why we use it?
PHP Code:
e=(condition)?value1:value2
or
PHP Code:
greeting=(visitor=="PRES")?"Dear President ":"Dear ";
AND this progam
PHP Code:
var d=new Date();
theDay=d.getDay();
switch (theDay)
{
case 5:
document.write("Finally Friday");
break;
case 6:
document.write("Super Saturday");
break;
case 0:
document.write("Sleepy Sunday");
break;
default:
document.write("I'm looking forward to this weekend!");
}
Break? case? default?
Bookmarks