[thelist] LI value attribute?

Diego Barcia webmaster at sci-web.com.ar
Thu Nov 28 21:57:01 CST 2002


Hi,

On Friday, November 29, 2002 12:26 AM
Marc Seyon wrote:
> Evening all,
>
> <li value="x"> isn't valid xhtml strict. The value attribute has been
> deprecated. Any ideas on achieving the same effect in other ways?
>

You could use the "title" attribute. If the values for that attributes are
intended to be unique you could use "id" also, although not recommended, yet
it could be done. If you're using DOM for getting that attribute value (I
assume, wrongly perhaps) you could use (this is a javascript based example,
however in other languages the DOM implementation could be similar if not
identical):

var label = [variable holding a <li> element object].getAttribute('title');

then the var label would hold the title attribute value as a string.

Diego
Web Designer & Developer
http://sci-web.com.ar/
Freelancer: http://sci-web.com.ar/web/






More information about the thelist mailing list