Passing dynamic variables back into HTML - Best Practices

Passing dynamic variables back into HTML - Best Practices

Hi, what would be the best way to pass dynamic vars back into an HTML entity?
I am tracking the mouse movement and passing with  append()  and it just makes a whole list when the mouse moves, I just want a current dynamic value to be presented; one line that changes dynamically. How should I approach this?