Creation and insertion of jquery elements

doing exercises on the creation and insertion of dynamic elements while watching the sharp jQuery

<ul id="ul">
            <li title=""></li>
            <li title=""></li>
            <li title=""></li>
        </ul>
            $("html"); // dom
            //li
            var $li_1 = $("<li></li>");
            //li
            var $li_2 = $("<li><li>");
            //   li
            var $li_3 = $("<li tltle = ""><li>");
            
            //
            // append()  
            $ul.append($li_1).append($li_2).append($li_3);

as a result, it is found that the empty li tag is repeated many times

Aug.09,2021

unclosed tags


after $li_2 and $li_3 are not closed
insert can be written together $ul.append ($li_1,$li_2,$li_3)


//li
var $li_2 = $("<li><li>"); //<li></li>

double tag elements with a slash at the end, such as

< / div >
unclosed tags will be recognized as two elements in high-version browsers, such as
  • banana
  • will be recognized as
  • banana
  • after actual compilation.

  • Banana
  • should be
  • Banana
  • . Notice the closing tag. The
  • should be followed by
  • .
    MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
    MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea89b1-1eec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
    MySQL Errno : 1021
    Message : Disk full (/tmp/#sql-temptable-64f5-1ea89b1-1eec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
    Need Help?