用js函数触发Servlet
servlet 查询数据库并将数据放入文件中。 该数据文件必须每 10 秒刷新一次,以便用户查看更新的信息。
我需要使用 javascript 函数触发 servlet 的帮助。我成功在 JS 中获取 timeinterval 方法,但在调用 servlet 时遇到问题。
var int=self.setInterval("trigger()",10000);
function(){
//Servlet queries the db and loads the data into the file.
trigger servlet ...???
" TriggerServlet? ......
}
The servlet queries the database and throws data in to a file.
This data file has to be refreshed every 10 seconds for users to view the updated information.
I need help with triggering servlet with javascript function. I am successful in getting the timeinterval method in JS but I am having issue calling the servlet.
var int=self.setInterval("trigger()",10000);
function(){
//Servlet queries the db and loads the data into the file.
trigger servlet ...???
" TriggerServlet? ......
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)