Inline HTML form discarded

Chrome seems to be ignoring forms embedded in another form.

See this script ( http://jsfiddle.net/jeljeljel/NbUeQ/1/ )

HTML

<form>
    <div id="dialog">
        <form id="theForm">
            <label>abc</label>
        </form>
    </div>
</form>

Js

alert($('#theForm').length);

Note 'theForm' not found.

The only solution that has no inline forms?

+4
source share
1 answer

Yes.

The only solutions are not inline forms, as this is invalid HTML.

Refer to the W3C XHTML spec Element Bans section at http://www.w3.org/TR/xhtml1/#prohibitions

+3
source

All Articles