|
-
Sep 26th, 2001, 09:46 AM
#1
Thread Starter
Lively Member
if/then
Where can I learn more about the if/then statement in this format:
var x = "hello";
x=(x=="hello")? alert("hello") : alert("bye")
thank you
-
Sep 26th, 2001, 09:59 AM
#2
Frenzied Member
Well, it shouldn't have the x= on the front.
I just have an ORielly book around. I don' t know of any online JavaScript references, but I'm sure there are some.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Sep 26th, 2001, 12:11 PM
#3
-
Sep 27th, 2001, 12:13 AM
#4
Hyperactive Member
Its the TERNARY OPERATOR.
http://msdn.microsoft.com/library/de...onditional.asp
This link gives a sample of its usage and other operators too...
- Jemima.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|