How can I add an element after another element?

前端 未结 4 1189
渐次进展
渐次进展 2020-11-28 20:42

I have a certain textbox and I want to add a div after it. I\'ve tried the .append() function, but that only adds the div in the element.

For example, I

4条回答
  •  忘掉有多难
    2020-11-28 21:09

    First of all, input element shouldn't have a closing tag (from http://www.w3.org/TR/html401/interact/forms.html#edef-INPUT : End tag: forbidden ).

    Second thing, you need the after(), not append() function.

提交回复
热议问题