From firebug:
>>> $("form#commentform").serialize();
"username=&email=&comment=&verify="
>>> $("#commentform").serialize();
""
>>> $("form#commentform")
[form#commentform]
>>> $("#commentform")
[div#commentform]
>>> $("#commentform").length
1
This is really weird,form#commentform works,but #commentform doesn’t,why?
You have two elements with the id
commentform.This is invalid.
$('#commentform')returns only the first one, which cannot be serialized.From the specs: