[Javascript] Check if ID exist

Peter Lauri lists at dwsasia.com
Fri Aug 18 14:07:22 CDT 2006


I said some designers do so, I do not :)

Your reasoning is correct...


-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]
On Behalf Of Matt Warden
Sent: Saturday, August 19, 2006 2:04 AM
To: [JavaScript List]
Subject: Re: [Javascript] Check if ID exist

On 8/18/06, Peter Lauri <lists at dwsasia.com> wrote:
> [snip]
> There is no such method, it is "Element", not "Elements", and (in a
> given document) no two elements may share the same id.
> [/snip]
>
> There are many designers who use the ID for the CSS property, where it
> should not be used. That is logical not good to have multiple ID, but if
you
> do not have any JavaScript running on the page it still works :)

The proper attribute to group a class of elements together is...
class. It is not a CSS/JS property. It is a logical grouping, just as
ID is a *unique* identifier.

The blink tag works in some browsers too. Doesn't mean you should use
it. And I certainly see no reason to duplicate IDs when you can simply
use class.

-- 
Matt Warden
Cleveland, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list