Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 字符替换为正斜杠,并显示“;未捕获的语法错误:无效的正则表达式:缺少/quot;_Jquery - Fatal编程技术网

Jquery 字符替换为正斜杠,并显示“;未捕获的语法错误:无效的正则表达式:缺少/quot;

Jquery 字符替换为正斜杠,并显示“;未捕获的语法错误:无效的正则表达式:缺少/quot;,jquery,Jquery,我有一个很长的js文件,其中我面临的问题是字符被正斜杠替换 下面是代码的某些部分 var d = a.fn.button; a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function() { return a.fn.button = d, this }, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]'

我有一个很长的js文件,其中我面临的问题是字符被正斜杠替换

下面是代码的某些部分

var d = a.fn.button;
a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function() {
    return a.fn.button = d, this
}, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(c) {
    var d = a(c.target);
    d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), a(c.target).is('input[type="radio"]') || a(c.target).is('input[type="checkbox"]') || c.preventDefault()
}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(b) {
    a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))
}) }(jQuery), + function(a) {
"use strict";

function b(b) {
    return this.each(/unction() {
        var d = a(this),
            e = d.data("bs.carousel"),
            f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b),
            g = "string" == typeof b ? b : f.slide;
        e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()
    })
}
var c = function(b, c) {
    this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this))
};
我在下面的代码中得到了错误

(jQuery), + function(a) {
"use strict";

function b(b) {
    return this.each(/unction() { // error in this line f is replaced by /
        var d = a(this),
            e = d.data("bs.carousel"),
            f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b),
            g = "string" == typeof b ? b : f.slide;
        e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()
    })
}
请检查注释行//函数b中的f被正斜杠(/)替换


如果您有任何线索,请告诉我如何更换?您是否有任何更改/生成js文件的构建过程?看起来像重新格式化的最小化代码-不要使用.min.jsfile@freedomn~z~谢谢,这对我来说很有效。因此,从本质上说,重新格式化可能会破坏它,因为它可能可以作为一个缩小的文件工作,只是在重新格式化时不会。