Javascript examples for jQuery:List
Use append() method to insert a third <li> element: "List item 3", at the end of the <ol> element
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("ol").append("<li>List item 3</li>"); });/*www .j ava2 s . c om*/ </script> </head> <body> <ol> <li>List item 1</li> <li>List item 2</li> </ol> </body> </html>