Don't get cart.js.

How to add attributes to buttons? How to add user's input to var cart?