Results 1 to 2 of 2

Thread: add and remove li using checkbox button

  1. #1
    Join Date
    Mar 2013

    add and remove li using checkbox button

    on click of checkbox i want to add an li in ul and onclick of cross button given on an li that li should be remove and that checkbox will also get unchecked using javascript only.

  2. #2
    Join Date
    Oct 2010
    Versailles, France
    Walk through the DOM tree (Come on, it's spring !) and use the collection childNodes, the methods appendChild, nextSiebling, ... for example to remove a list item myliToRemove.parentNode.removeChild(myliToRemove) etc. See this page about the Node Object

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center