you are mixing two different things, the data event in the node you are talking about is triggered because the network connection is established when you point the browser to your site, the data is received and sent from the client to the server and back.
this has nothing to do with client ui events, such as the click event on a button.
if you want node to recognize a click on your button, you need to send something to the server, you can either use the form, or issue an ajax request, or use websites.
for ajax requests with jquery: jquery $ .ajax documentation
popular websockets implementation for node.js socket.io
source share