W3C home > Mailing lists > Public > www-html@w3.org > October 2012

Re: Syntax to access div by ID.

From: Patrick H. Lauke <redux@splintered.co.uk>
Date: Fri, 12 Oct 2012 14:21:42 +0100
Message-ID: <50781966.90103@splintered.co.uk>
To: www-html@w3.org
On 11/10/2012 13:05, Gautam Sathe wrote:
[...]
> <div id="testDiv">...</div>
>
> In a script section he was trying to set its display property to 'none'
> and he had coded it like:
>
> testDiv.style.display = 'none';
[...]

I seem to remember this was something IE did first, and other browsers 
have adopted the behavior for compatibility reasons. It may actually now 
be standardised somewhere in HTML5/Living Standard.

P
-- 
Patrick H. Lauke
______________________________________________________________
re┬Ědux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]

www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com | http://flickr.com/photos/redux/
______________________________________________________________
twitter: @patrick_h_lauke | skype: patrick_h_lauke
______________________________________________________________
Received on Friday, 12 October 2012 13:22:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 12 October 2012 13:22:29 GMT