Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Obfuscated Javascript?
Message
De
16/02/2013 15:00:16
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
16/02/2013 11:41:21
Information générale
Forum:
Javascript
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01566169
Message ID:
01566234
Vues:
55
>now that is a line encouraging you to be fluent in, not with javascript ;-)

It's actually easy if you know a few things about jQuery:

- every selector function returns a collection of objects
- every function which does something to a collection of objects returns that collection
- other functions return attributes
- functions can be chained, i.e. if one returns a collection, then you can just append .anotherFunction() and it will be executed on the result of the previous function

So... $("some selector") returns a collection of objects (probably just one in this case)

$("some selector").val("some text") sets that text as a .value of the object(s)

$("some selector").val("some text").val() gets that value

And then you get the values of these concatenated as ordinary strings.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform