Javascript Firefox的html注入问题

Javascript Firefox的html注入问题,javascript,jquery,html,firefox,Javascript,Jquery,Html,Firefox,我正在尝试向div中插入一个href url,这段代码在Chrome中工作得很好,但在Firefox中却不行,有人指出原因吗?谢谢 Html- <div id="content"></div> <style> embed, object { height: 100%; top: 0; position: absolute; width: 100%; } </style>

我正在尝试向div中插入一个href url,这段代码在Chrome中工作得很好,但在Firefox中却不行,有人指出原因吗?谢谢

Html-

<div id="content"></div>
<style>

    embed, object {
        height: 100%;
        top: 0;
        position: absolute;
        width: 100%;
    }
</style>
JQuery-

<script>
    $(document).ready(function () {
      $("li.sub-level3").click(function () {

                var hrefValue = $(this).children().clone().attr("href");

                history.pushState(null, null, hrefValue);
                $("#content").html('<object data=' + hrefValue + ' />').css("min-height", "1000px");

               $("p").css("display", "none")
               $("#cookie-bar").css("display", "none")

            });
 });
</script>
控制台在以下函数中显示“o未定义”——

prepareTx: function(e, t) {

        var i, s, n, a, r, o = this.opts();
        return o.slideCount < 2 ? void(o.timeoutId = 0) : (!e || o.busy && !o.manualTrump || (o.API.stopTransition(), o.busy = !1, clearTimeout(o.timeoutId), o.timeoutId = 0), void(o.busy || (0 !== o.timeoutId || e) && (s = o.slides[o.currSlide], n = o.slides[o.nextSlide], a = o.API.getSlideOpts(o.nextSlide), r = o.API.calcTx(a, e), o._tx = r, e && void 0 !== a.manualSpeed && (a.speed = a.manualSpeed), o.nextSlide != o.currSlide && (e || !o.paused && !o.hoverPaused && o.timeout) ? (o.API.trigger("cycle-before", [a, s, n, t]), r.before && r.before(a, s, n, t), i = function() {
            o.busy = !1, o.container.data("cycle.opts") && (r.after && r.after(a, s, n, t), o.API.trigger("cycle-after", [a, s, n, t]), o.API.queueTransition(a), o.API.updateView(!0))
        }, o.busy = !0, r.transition ? r.transition(a, s, n, t, i) : o.API.doTransition(a, s, n, t, i), o.API.calcNextSlide(), o.API.updateView()) : o.API.queueTransition(a))))
    },

您好,根据netmarketshare.com/…只有0.57%的用户使用Firefox mobile/tablet

我想这不值得为这么小的比例而担心,因此我的解决方案是提醒用户,如果他们在手机/平板电脑上使用Firefox,请使用其他浏览器

任何人反对这一点,请让我知道,以便我可以审查解决方案


感谢您的回复。

您好,根据netmarketshare.com/…只有0.57%的用户使用Firefox mobile/tablet

我想这不值得为这么小的比例而担心,因此我的解决方案是提醒用户,如果他们在手机/平板电脑上使用Firefox,请使用其他浏览器

任何人反对这一点,请让我知道,以便我可以审查解决方案


感谢您的回复。

FF中的控制台在说什么?还可以尝试使用$li.sub-level3.on'click',function{代替:$li.sub-level3.clickfunction{Hi atoms控制台-TypeError:o未定义[Learn More]app.min.js:1:4333 e.fn.cycle.API.prepareTx app.min.js:1:4333 e.fn.cycle.API.queueTransition/s.Timeoutids在代码中的“o”在哪里?Hi atoms请参阅编辑的posttry this:history.pushState{},hrefValue;FF中的控制台在说什么?也可以尝试使用$li.sub-level3。单击时,函数{代替$li.sub-level3.clickfunction{Hi-atoms控制台-类型错误:o未定义[了解更多信息]app.min.js:1:4333 e.fn.cycle.API.prepareTx app.min.js:1:4333 e.fn.cycle.API.queueTransition/s.TimeoutId代码中的“o”在哪里?嗨,请参阅编辑后的文章:history.pushState{},hrefValue;