0x800a1391 - Microsoft JScript运行时错误:'$'未定义 [英] 0x800a1391 - Microsoft JScript runtime error: '$' is undefined

查看:106
本文介绍了0x800a1391 - Microsoft JScript运行时错误:'$'未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人请帮我解决这个错误...









 sb.AppendLine(  $()。toastmessage('showToast' ,{); 
sb.AppendLine( text:' +消息+ ',);
sb.AppendLine( sticky:true,);
sb.AppendLine( position:'top-right',);
sb.AppendLine( type:'success',);
sb.AppendLine( closeText:'',);
sb.AppendLine( }



););



以上代码在运行时生成此代码



 $()。toastmessage( '  showToast',{
text:' 消息提示'
sticky: true
位置: ' top-right'
type: ' success'
closeText:' '
});







0x800a1391 - 微软JScript运行时错误:''$''未定义



这是我的实际jquery文件,其功能我试图调用

< pre lang =cs>(function(c){
var b = {inEffect:{opacity: show},inEffectDuration: 600 ,stayTime: 5000 ,text: ,sticky: false ,键入: notice,position:< span class =code-string> top-right,closeText: ,close: null };
var a = {init:function(d){
if (d ){
c.extend(b,d)
}
},showToast:function(f){
var g = {};
c.extend(g,b,f);
var j,e,d,i,h;
j =(!c( 。toast-container)。length)? c( < div>< / div>)。addClass( toast-container)。addClass( toast-position - + g.position).appendTo( body ):c( 。toast-container);
e = c( < div>< / div>)。addClass( toast-item-wrapper);
d = c( < div>< / div>)。hide( ).addClass( toast-item toast-type - + g.type).appendTo(j ).html(c( < p>)。append(g.text))。 animate(g.inEffect,g.inEffectDuration).wrap(e);
i = c( < div>< / div>)。addClass( toast-item-close)。prependTo(d).html(g.closeText).click (function(){
c()。toastmessage( removeToast,d,g)
});
h = c( < div>< / div>)。addClass( toast-item-image)。addClass( toast-item-image - + g.type).prependTo(d);
if (navigator.userAgent.match(/ MSIE 6 / i)){
j.css({top:document.documentElement.scrollTop })
} if (!g.sticky){
setTimeout(function(){
c()。toastmessage( removeToast,d,g)
},g.stayTime)
} < span class =code-keyword> return d
},showNoticeToast:function(e){
var d = { text:e,type: notice};
return c()。toastmessage( showToast,d)
},showSuccessToast:function(e){
var d = {text:e,type: success};
return c()。toastmessage( showToast,d)
},showErrorToast:function(e){
var d = {text:e,type: error};
return c()。toastmessage( showToast,d)
},showWarningToast:function(e){
var d = {text:e,type: warning};
return c()。toastmessage( showToast,d)
},removeToast:function(e,d){
e.animate({opacity: 0}, 600 ,function(){
e.parent()。animate( {height: 0px}, 300 ,function(){
e.parent()。 remove ()
})
});
如果(d&& d.close!== null ){
d.close()
}
}
};
c.fn.toastmessage = function(d){
if (a [d]){
return a [d] .apply( this ,Array.prototype.slice.call(arguments, 1 ))
} 其他 {
如果 typeof d === object ||!d){
return a.init.apply( this ,arguments)
} else {
c.error( 方法 + d + 在jQuery.toastmessage上不存在
}
}
}
})(jQuery);

解决方案

()。toastmessage('showToast',{);
sb.AppendLine( text:' + Message + ',);
sb.AppendLine( sticky:true,);
sb.AppendLine( position:'top-right',);
sb.AppendLine( type:'success',);
sb.AppendLine( closeText:'',);
sb.AppendLine( }



););



以上代码在运行时生成此代码



 


()。toastmessage(' showToast',{
text:' Message Alert'
sticky:< span class =code-keyword> true ,
position:' top-right'
类型:' success'
closeText:< span class =code-string>' '
});







0x800a1391 - Microsoft JScript运行时错误:''


''未定义



这是我的交流tual jquery文件,其功能我试图调用

(function(c){
var b = {inEffect:{opacity: show},inEffectDuration: 600 ,stayTime: 5000 ,text: ,sticky: false ,输入: notice,position: top-right,closeText : ,close: null } ;
var a = {init:function(d){
if (d ){
c.extend(b,d)
}
},showToast:function(f){
var g = {};
c.extend(g,b,f);
var j,e,d,i,h;
j =(!c( 。toast-container)。length)? c( < div>< / div>)。addClass( toast-container)。addClass( toast-position - + g.position).appendTo( body ):c( 。toast-container);
e = c( < div>< / div>)。addClass( toast-item-wrapper);
d = c( < div>< / div>)。hide( ).addClass( toast-item toast-type - + g.type).appendTo(j ).html(c( < p>)。append(g.text))。 animate(g.inEffect,g.inEffectDuration).wrap(e);
i = c( < div>< / div>)。addClass( toast-item-close)。prependTo(d).html(g.closeText).click (function(){
c()。toastmessage( removeToast,d,g)
});
h = c( < div>< / div>)。addClass( toast-item-image)。addClass( toast-item-image - + g.type).prependTo(d);
if (navigator.userAgent.match(/ MSIE 6 / i)){
j.css({top:document.documentElement.scrollTop })
} if (!g.sticky){
setTimeout(function(){
c()。toastmessage( removeToast,d,g)
},g.stayTime)
} < span class =code-keyword> return d
},showNoticeToast:function(e){
var d = { text:e,type: notice};
return c()。toastmessage( showToast,d)
},showSuccessToast:function(e){
var d = {text:e,type: success};
return c()。toastmessage( showToast,d)
},showErrorToast:function(e){
var d = {text:e,type: error};
return c()。toastmessage( showToast,d)
},showWarningToast:function(e){
var d = {text:e,type: warning};
return c()。toastmessage( showToast,d)
},removeToast:function(e,d){
e.animate({opacity: 0}, 600 ,function(){
e.parent()。animate( {height: 0px}, 300 ,function(){
e.parent()。 remove ()
})
});
如果(d&& d.close!== null ){
d.close()
}
}
};
c.fn.toastmessage = function(d){
if (a [d]){
return a [d] .apply( this ,Array.prototype.slice.call(arguments, 1 ))
} 其他 {
如果 typeof d === object ||!d){
return a.init.apply( this ,arguments)
} else {
c.error( 方法 + d + 在jQuery.toastmessage上不存在
}
}
}
})(jQuery);


Somebody please help me to solve this error...




sb.AppendLine("$().toastmessage('showToast', {");
 sb.AppendLine("    text: '" + Message + "',");
 sb.AppendLine("    sticky: true,");
 sb.AppendLine("    position: 'top-right',");
 sb.AppendLine("    type: 'success',");
 sb.AppendLine("    closeText: '',");
 sb.AppendLine("            }


);");

above code generates this code during runtime

$().toastmessage('showToast', {
    text: 'Message Alert',
    sticky: true,
    position: 'top-right',
    type: 'success',
    closeText: '',
            });




0x800a1391 - Microsoft JScript runtime error: ''$'' is undefined

and this is my actual jquery file whose function i am trying to call

(function (c) {
    var b = { inEffect: { opacity: "show" }, inEffectDuration: 600, stayTime: 5000, text: "", sticky: false, type: "notice", position: "top-right", closeText: "", close: null };
    var a = { init: function (d) {
        if (d) {
            c.extend(b, d)
        }
    }, showToast: function (f) {
        var g = {};
        c.extend(g, b, f);
        var j, e, d, i, h;
        j = (!c(".toast-container").length) ? c("<div></div>").addClass("toast-container").addClass("toast-position-" + g.position).appendTo("body") : c(".toast-container");
        e = c("<div></div>").addClass("toast-item-wrapper");
        d = c("<div></div>").hide().addClass("toast-item toast-type-" + g.type).appendTo(j).html(c("<p>").append(g.text)).animate(g.inEffect, g.inEffectDuration).wrap(e);
        i = c("<div></div>").addClass("toast-item-close").prependTo(d).html(g.closeText).click(function () {
            c().toastmessage("removeToast", d, g)
        });
        h = c("<div></div>").addClass("toast-item-image").addClass("toast-item-image-" + g.type).prependTo(d);
        if (navigator.userAgent.match(/MSIE 6/i)) {
            j.css({ top: document.documentElement.scrollTop })
        } if (!g.sticky) {
            setTimeout(function () {
                c().toastmessage("removeToast", d, g)
            }, g.stayTime)
        } return d
    }, showNoticeToast: function (e) {
        var d = { text: e, type: "notice" };
        return c().toastmessage("showToast", d)
    }, showSuccessToast: function (e) {
        var d = { text: e, type: "success" };
        return c().toastmessage("showToast", d)
    }, showErrorToast: function (e) {
        var d = { text: e, type: "error" };
        return c().toastmessage("showToast", d)
    }, showWarningToast: function (e) {
        var d = { text: e, type: "warning" };
        return c().toastmessage("showToast", d)
    }, removeToast: function (e, d) {
        e.animate({ opacity: "0" }, 600, function () {
            e.parent().animate({ height: "0px" }, 300, function () {
                e.parent().remove()
            })
        });
        if (d && d.close !== null) {
            d.close()
        }
    }
    };
    c.fn.toastmessage = function (d) {
        if (a[d]) {
            return a[d].apply(this, Array.prototype.slice.call(arguments, 1))
        } else {
            if (typeof d === "object" || !d) {
                return a.init.apply(this, arguments)
            } else {
                c.error("Method " + d + " does not exist on jQuery.toastmessage")
            }
        }
    }
})(jQuery);

解决方案

().toastmessage('showToast', {"); sb.AppendLine(" text: '" + Message + "',"); sb.AppendLine(" sticky: true,"); sb.AppendLine(" position: 'top-right',"); sb.AppendLine(" type: 'success',"); sb.AppendLine(" closeText: '',"); sb.AppendLine(" }


);");

above code generates this code during runtime


().toastmessage('showToast', { text: 'Message Alert', sticky: true, position: 'top-right', type: 'success', closeText: '', });




0x800a1391 - Microsoft JScript runtime error: ''


'' is undefined

and this is my actual jquery file whose function i am trying to call

(function (c) {
    var b = { inEffect: { opacity: "show" }, inEffectDuration: 600, stayTime: 5000, text: "", sticky: false, type: "notice", position: "top-right", closeText: "", close: null };
    var a = { init: function (d) {
        if (d) {
            c.extend(b, d)
        }
    }, showToast: function (f) {
        var g = {};
        c.extend(g, b, f);
        var j, e, d, i, h;
        j = (!c(".toast-container").length) ? c("<div></div>").addClass("toast-container").addClass("toast-position-" + g.position).appendTo("body") : c(".toast-container");
        e = c("<div></div>").addClass("toast-item-wrapper");
        d = c("<div></div>").hide().addClass("toast-item toast-type-" + g.type).appendTo(j).html(c("<p>").append(g.text)).animate(g.inEffect, g.inEffectDuration).wrap(e);
        i = c("<div></div>").addClass("toast-item-close").prependTo(d).html(g.closeText).click(function () {
            c().toastmessage("removeToast", d, g)
        });
        h = c("<div></div>").addClass("toast-item-image").addClass("toast-item-image-" + g.type).prependTo(d);
        if (navigator.userAgent.match(/MSIE 6/i)) {
            j.css({ top: document.documentElement.scrollTop })
        } if (!g.sticky) {
            setTimeout(function () {
                c().toastmessage("removeToast", d, g)
            }, g.stayTime)
        } return d
    }, showNoticeToast: function (e) {
        var d = { text: e, type: "notice" };
        return c().toastmessage("showToast", d)
    }, showSuccessToast: function (e) {
        var d = { text: e, type: "success" };
        return c().toastmessage("showToast", d)
    }, showErrorToast: function (e) {
        var d = { text: e, type: "error" };
        return c().toastmessage("showToast", d)
    }, showWarningToast: function (e) {
        var d = { text: e, type: "warning" };
        return c().toastmessage("showToast", d)
    }, removeToast: function (e, d) {
        e.animate({ opacity: "0" }, 600, function () {
            e.parent().animate({ height: "0px" }, 300, function () {
                e.parent().remove()
            })
        });
        if (d && d.close !== null) {
            d.close()
        }
    }
    };
    c.fn.toastmessage = function (d) {
        if (a[d]) {
            return a[d].apply(this, Array.prototype.slice.call(arguments, 1))
        } else {
            if (typeof d === "object" || !d) {
                return a.init.apply(this, arguments)
            } else {
                c.error("Method " + d + " does not exist on jQuery.toastmessage")
            }
        }
    }
})(jQuery);


这篇关于0x800a1391 - Microsoft JScript运行时错误:'$'未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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