[PHPLondon-discuss] JQuery .attr

David Nattriss dave at natts.com
Sat Sep 22 23:55:08 BST 2007


I've just started using jQuery myself.

That all sounds right to me? If there is no value for the input, it returned
'undefined', and if you set it to 'stuff', that's what it returns.

I have to say though, this is Javascript, not PHP! 

-----Original Message-----
From: phplondon-discuss-bounces at lists.phplondon.org
[mailto:phplondon-discuss-bounces at lists.phplondon.org] On Behalf Of Alex V.
Sent: Saturday, September 22, 2007 11:38 AM
To: PHP London discussion list
Subject: [PHPLondon-discuss] JQuery .attr

Maybe sobebody can help me with jquery?

let i have <input id=element name=name type=text value="" /> if I do
$('#element').attr('value') - it returns "undefined"

let i have <input id=element name=name type=text value="stuff" /> if I do
$('#element').attr('value') - it returns "stuff"

what is wrong?

Regards,
Alex
http://dev.intoex.com


_______________________________________________
Phplondon-discuss mailing list
Phplondon-discuss at lists.phplondon.org
http://lists.phplondon.org/cgi-bin/mailman/listinfo/phplondon-discuss




More information about the Phplondon-discuss mailing list