AJAX调用函数重置标志数据库 [英] call ajax function to reset the flag in database

查看:144
本文介绍了AJAX调用函数重置标志数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须调用AJAX功能重设标志数据库上的浏览器关闭事件。

I have to call the ajax function to reset the flag in database on the browser close event.

我是这样做的prevent多次登录为我设置的日志事件的标志,但我必须在浏览器关闭事件重置,所以我必须通过AJAX功能来做到这一点,但我新来所以请指引我叫AJAX功能。

I am doing so for the prevent the multiple log in for that I have set the flag on log in event but I have to reset it on browser close event so I have to do it by ajax function but I am new to to so please guide me to call ajax function.

我已经审阅了<一href="http://stackoverflow.com/questions/18591590/how-to-$p$pvent-user-to-login-from-multiple-location-or-from-different-browser-in/18591653?noredirect=1#comment28035951_18591653">que

推荐答案

这是你如何使一个Ajax请求到服务器复位数据库标记。

This is how you can make an ajax request to your server to reset database flag.

$.ajax({
        url: your url,
        type: "POST",
        data: {
            Flag: value
        },
        error: function () { alert("Unexpected Error"); },
        success: function (data) {

        }
    });

这篇关于AJAX调用函数重置标志数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆