且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从servlet调用JavaScript的功能

更新时间:2023-12-04 14:19:34

无法从servlet调用java脚本函数。相反,你可以使用

It is not possible to call a java script function from a servlet. Rather, you can print javascript code using

response.getOutputStream()。println([javascript code]);

进入浏览器,然后javascript函数将在浏览器中执行。

into the browser and then the javascript function will be executed in the browser.