Multi-line string insert using jQuery

前端 未结 4 1149
没有蜡笔的小新
没有蜡笔的小新 2020-11-27 18:47
$(\"#addSelect\").click(function() {
        $(\"#optionsForm\").after(\"Hello world.\");
} );

This works.

$(\"#addSelect\").click(         


        
4条回答
  •  没有蜡笔的小新
    2020-11-27 19:22

    Change all the double quotes for the attributes to single quotes.

    $("#addSelect").click(function() { 
            $("#optionsForm").after(" \
         \
         \
            
      \
    • \
    \ \ "); } );

提交回复
热议问题