문제

I'm building a simple web app with front-end written in html/JavaScript and back end in java. I wanted to know, if I have two buttons, and pressing each button will execute a different function on the server end. What data should I pass to the server using web sockets to execute the respective function in the server end ? I cant directly call a java function from the javascript event handler code. I was thinking of sending button id of the button clicked but is there a better solution?

도움이 되었습니까?

해결책

I got it to work by sending button ID.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top