Just Javascript (as requested)

Add this function somewhere on your page (preferably in the <head> )

function clearBox(elementID) { document.getElementById(elementID).innerHTML = ""; }

Then add the button on click event:

<button onclick="clearBox('cart_item')" />

In JQuery (for reference)

If you prefer JQuery you could do: