使用 Ajax 将 onBlur 事件发布到 php 脚本
我正在努力降低客户的购物车放弃率。我希望能够在每次 onblur 触发时将表单数据从注册表单的各个输入字段发布到 php 脚本。
表单字段需要保留访问者输入的值,并且页面不应刷新,因此我认为 Ajax 是最好的解决方案。任何执行此操作的示例代码将不胜感激。
谢谢
I'm working on lowering shopping cart abandonment rates for a client. I'd like to be able to post form data from individual input fields of a registration form to a php script, every time onblur fires.
The form fields would need to keep the value entered by the visitor and page shouldn't refresh so I think Ajax is the best solution. Any example code that does this would be appreciated.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的东西可能对您有用:
请求末尾的随机数是为了确保浏览器不会返回缓存的响应,而不是实际将数据发送到服务器。
Something like this would probably work for you:
The random number at the end of the request is to make sure the browser doesn't return a cached response instead of actually sending your data to the server.