Deleting html

I’m trying to think of the best way to do this, and have it be browser-friendly (Read: Runs in IE, FF, Chrome, and optimally Safari too, but the last one isnt necessary).

User selects an item in a dropdown list. Clicks the Add button.
A new entry inside a DIV appears, which consists of a hidden form field, the entry name, and a Del button.
When the delete button, i need it to erase that entry (and the associated hidden field) but not the whole block.

You have 2 options as I see it.

  1. use javascript to display/hide elements by changing their display style as buttons are clicked.

  2. Use the DOM methods to create/add/remove elements as buttons are clicked.