move the form tag before script tag

currently this demo is not working, this is because when $("form") bind "submit" event, the form tag is not in DOM yet. Need to move form before the binding.
This commit is contained in:
loveky 2013-03-08 09:56:53 +08:00
parent d7273e2bd6
commit bfabbe7861
1 changed files with 3 additions and 3 deletions

View File

@ -42,6 +42,9 @@ __END__
@@ chat
<pre id='chat'></pre>
<form>
<input id='msg' placeholder='type message here...' />
</form>
<script>
// reading
@ -56,6 +59,3 @@ __END__
});
</script>
<form>
<input id='msg' placeholder='type message here...' />
</form>