Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个前端 JS 应用程序(带有可视滑块),每当用户更新滑块时,我想将新信息发送到 C# 后端(ASP.NET)。根据我的发现,AJAX 将是最好的方法。但我不希望后端不断地触发 AJAX 请求——只有在用户进行更改时。有没有办法解决这个问题?
跟踪 javascript 中的状态,然后当您的事件处理程序触发时,您可以在触发 ajax 请求之前检查状态是否更改