Can you nest html forms?

前端 未结 20 3101
悲&欢浪女
悲&欢浪女 2020-11-21 04:56

Is it possible to nest html forms like this

so

20条回答
  •  借酒劲吻你
    2020-11-21 05:14

    The second form will be ignored, see the snippet from WebKit for example:

    bool HTMLParser::formCreateErrorCheck(Token* t, RefPtr& result)
    {
        // Only create a new form if we're not already inside one.
        // This is consistent with other browsers' behavior.
        if (!m_currentFormElement) {
            m_currentFormElement = new HTMLFormElement(formTag, m_document);
            result = m_currentFormElement;
            pCloserCreateErrorCheck(t, result);
        }
        return false;
    }
    

提交回复
热议问题