Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #22599
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Denis McMahon <denismfmcmahon@gmail.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Default values of checkboxes in forms |
| Date | Mon, 13 Jan 2014 13:02:25 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 26 |
| Message-ID | <lb0o51$k2a$1@dont-email.me> (permalink) |
| References | <2fae46c4-b07c-48e6-a6b4-d7cdc597225a@googlegroups.com> <26361713-4ab5-4df3-9cf4-3f293e53d2ff@googlegroups.com> <548b3877-55d8-4daa-baa6-672d4978c617@googlegroups.com> <a2ea0b02-d30d-48a7-9fda-a5f5d1f54501@googlegroups.com> <XnsA2B36270A6918eejj99@194.109.133.133> <0ac12068-c3ea-45e1-99a4-a2e479bf2246@googlegroups.com> <XnsA2B3B56EEFAB0eejj99@194.109.133.133> <2d59b041-54b1-4e0a-9cd9-e27347f6d168@googlegroups.com> <XnsA2B476C6B92D7eejj99@194.109.133.133> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Mon, 13 Jan 2014 13:02:25 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="66ffcfa4470a58bcddbdcd1913f98ab4"; logging-data="20554"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BeLqwjJ0FNyWb056O7FDm2GpGFEK4sWM=" |
| User-Agent | Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2) |
| Cancel-Lock | sha1:j2Qm+uuvISEFinXzSZ9UG8Xk+Ps= |
| Xref | csiph.com comp.lang.javascript:22599 |
Show key headers only | View raw
On Mon, 13 Jan 2014 11:40:34 +0100, Evertjan. wrote:
> btw, what do you think will be returned here?
> First try to imagine it by analizing the code,
> and then test it by applying it to a file:
>
> ============= test.html ================
> <input type='checkbox' name='hi' id='lo' checked>
>
> <script type='text/javascript'>
> alert(document.getElementById('lo').name);
> alert(document.getElementById('lo').checked);
> alert(document.getElementsByName('hi')[0].id);
> </script>
> ========================================
I think this is a trick question. alert doesn't return a value.
I think the output of the three alerts will be:
First: The string value: "hi"
Second: The boolean value: true
Third: The string value: "lo"
--
Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Default values of checkboxes in forms jonas.thornvall@gmail.com - 2014-01-11 23:05 -0800
Re: Default values of checkboxes in forms jonas.thornvall@gmail.com - 2014-01-11 23:24 -0800
Re: Default values of checkboxes in forms jonas.thornvall@gmail.com - 2014-01-11 23:43 -0800
Re: Default values of checkboxes in forms jonas.thornvall@gmail.com - 2014-01-11 23:58 -0800
Re: Default values of checkboxes in forms "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-12 09:40 +0100
Re: Default values of checkboxes in forms jonas.thornvall@gmail.com - 2014-01-12 01:58 -0800
Re: Default values of checkboxes in forms "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-12 17:50 +0100
Re: Default values of checkboxes in forms jonas.thornvall@gmail.com - 2014-01-12 22:52 -0800
Re: Default values of checkboxes in forms "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-13 11:40 +0100
Re: Default values of checkboxes in forms Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-13 13:02 +0000
Re: Default values of checkboxes in forms "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-13 15:00 +0100
Re: Default values of checkboxes in forms jonas.thornvall@gmail.com - 2014-01-13 01:28 -0800
Re: Default values of checkboxes in forms "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-13 11:10 +0100
Re: Default values of checkboxes in forms "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-01-12 10:37 +0200
Re: Default values of checkboxes in forms Tim Streater <timstreater@greenbee.net> - 2014-01-12 09:25 +0000
csiph-web