And maybe be more specific. Like $('#MyNumber label').text()

On 10/24/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
>
>
> On Oct 23, 2007, at 2:25 PM, Johny wrote:
>
> >
> > Thank you all for help.
> > One more question:
> > For example if
> > I have
> > <div id="MyNumber"><label for="MyNumber">1000</label></div>
> >
> > Is it possible to get the value ( here 1000) ?
> >
> > I tried
> >   $('#MyNumber').val();
> >
> > but it did not work.
> >
> > Thank you for help
> >
>
> For non-form elements (input, textarea, etc), you'll have to use
> either .html() or .text(). Here it looks like you'll want to use .text()
>
> --Karl
> _________________
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
>

Reply via email to