1$ (". List2 li:nth-child (10n)"). After ('<Listyle= "margin:10px 0px;border-bottom:1px dashed #ccc;"></Li>');2 <!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en"3 "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">4 <HTMLxmlns= "http://www.w3.org/1999/xhtml">5 <Head>6 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"/>7 <title>jquery adds a line to every 10 strips</title>8 <Scriptlanguage= "JavaScript"src= "Jquery-1.7.2.min.js"></Script>9 <Scriptlanguage= "JavaScript"type= "Text/javascript">Ten $ (document). Ready (function(){ One $(". List2 li:nth-child (10n)"). After ('<li style= "margin:10px 0px;border-bottom:1px dashed #ccc;" ></li>'); A }); - </Script> - </Head> the <Body> - <style> - Li{List-style-type:None;} - </style> + <ulclass= "List2"> - <Li>001</Li> + <Li>002</Li> A <Li>003</Li> at <Li>004</Li> - <Li>005</Li> - <Li>006</Li> - <Li>007</Li> - <Li>008</Li> - <Li>009</Li> in <Li>010</Li> - <Li>011</Li> to <Li>012</Li> + <Li>013</Li> - <Li>014</Li> the <Li>11T</Li> * <Li>11W</Li> $ <Li>017</Li>Panax Notoginseng <Li>018</Li> - <Li>019</Li> the <Li>020</Li> + <Li>021</Li> A <Li>022</Li> the <Li>023</Li> + <Li>024</Li> - <Li>025</Li> $ <Li>026</Li> $ <Li>12V</Li> - <Li>028</Li> - <Li>029</Li> the <Li>030</Li> - <Li>031</Li>Wuyi <Li>032</Li> the </ul> - </Body> Wu </HTML>
jquery implements a method that adds 1 lines to every few elements