How to call function of JavaScript from servlet

后端 未结 3 1718
遇见更好的自我
遇见更好的自我 2021-01-13 03:14

I am new to web development. I have an external JavaScript file which has a function to show a prompt with error details. I need to pass the error message to the function. I

3条回答
  •  梦谈多话
    2021-01-13 03:34

    You can achieve similar kind of behavior by using following method. While sending response itself you can provide JS events.

    PrintWriter out = response.getWriter();
    out.println("");
    

    So when you click on Search button, search record method of JS will be called.

提交回复
热议问题