You do not place a script element after the body element:
3.6.1. The html element
Content model:
A head element followed by a body element.
Chris
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alexey Feldgendler
Sent: Thursday, March 29, 2007 12:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [whatwg] Apply script.defer to internal scripts
On Tue, 27 Mar 2007 21:49:41 +0200, Kristof Zelechovski
<[EMAIL PROTECTED]> wrote:
> Consider the following example:
>
> <script type="text/javascript" defer>
> function ha8validate(p5event) { return true }
> document.forms[0].onsubmit = ha8validate
> </script>
>
> The script embedded here is so short and specific that it makes no sense
> relaying it to an external location; however, if the script is not
> deferred, the script fails with an exception at run time because the
> document body is not constructed yet.
What's wrong with simply placing it after </body>?
--
Alexey Feldgendler <[EMAIL PROTECTED]>
[ICQ: 115226275] http://feldgendler.livejournal.com