简体   繁体   English

jQuery代码可在chrome和IE中使用,但不能在Firefox中使用

[英]JQuery Code works in chrome and IE but it not works in firefox

I can't find the problem please help me my jquery code works in IE and Chrome but it doesn't work in firefox my code snippet is: 我找不到问题,请帮助我,我的jquery代码可在IE和Chrome中运行,但在Firefox中不起作用,我的代码段为:

var dto = { 'searchObj': LogInObj };
$.ajax(
    {
        url: "Default.aspx/GetLogIn",
        //url: "Services.asmx/HelloWorld",
        data: JSON.stringify(dto),
        //data:'{}',
        type: "POST",
        contentType: "application/json; charset=utf-8",
        datatype: "Json",
        success: function (result) {
            var rt = result.d;
            if (rt.Success) {
                var data = rt.Data;
                $.session.set('UserId', data[0].UserId);
                var userType = data[0].UserTypeId;
                if (userType == 1) {
                    LogInPage.GetClientInfo(data[0].UserId);
                    **LogInPage.SaveUserLogs();**
                    window.location = 'AdminManager.aspx';
                }
                else if (userType == 2) {
                    LogInPage.GetClientInfo(data[0].UserId);
                    LogInPage.SaveUserLogs();
                    window.location = 'Base.aspx';
                    }
                else
                    alert('

I need to call LogInPage.SaveUserLogs() method. 我需要调用LogInPage.SaveUserLogs()方法。 thanks for response 谢谢你的回应

i use keyup event for text input that it doesn't work in firefox so i change it to keypress and my problem be solved. 我使用keyup事件进行文本输入,但在firefox中不起作用,因此我将其更改为keypress并解决了我的问题。 I can give more details if necessary. 如有必要,我可以提供更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM