Ce site disposera de fonctionnalités limitées pendant que nous effectuons des opérations de maintenance en vue de vous proposer un meilleur service. Si un article ne règle pas votre problème et que vous souhaitez poser une question, notre communauté d’assistance est prête à vous répondre via @FirefoxSupport sur Twitter, et /r/firefox sur Reddit.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

history forward is don't work in firefox?

  • 2 réponses
  • 3 ont ce problème
  • 1 vue
  • Dernière réponse par ellvas

more options

code:

var gads= function (id, config, src) {

   var iframe, body = document.body;
   if (document.createElement) {
       var iframe = document.createElement("IFRAME");
       if (iframe) {

           //set iframe domain consistent with the web page
           iframe.src = 'javascript:void((function(){var d=document;d.open();d.domain="webdomain.com";d.write("");d.close()})())';
           iframe.id = id;
           iframe.width = "1px";
           iframe.height = "1px";
           iframe.style.display = "none"
       }
   }
   if (body != null && body.appendChild && iframe) {
       body.appendChild(iframe);

       gads[id] = setInterval(function () {
           try {
               if (gads[id]) {
                   clearInterval(gads[id])
               }
               var iframeEle = document.getElementById(id),
                      iframeEleDoc = iframeEle.contentWindow.document;
               
               alert(1);    
               // dosomething in script
               iframeEleDoc.write('<!doctype html><ht'+'ml><bo'+'dy><scr'+'ipt>alert(2);</scr'+'ipt></bo'+'dy></ht'+'ml>');
               //run to here,  history forward is don't work.
               alert(3);
               window.setTimeout((function () {
                   iframeEleDoc.close()
               }), 0)
           } catch (e) {
               alert(e)
           }
       }, 100)
   }

}; 

run to the "alert (1)", history forward showed normal, but run to the "alert (3)" when history forward display abnormal. where is the forward? And this phenomenon occurs only in firefox, other browsers have shown normal.

code: <pre><nowiki>var gads= function (id, config, src) { var iframe, body = document.body; if (document.createElement) { var iframe = document.createElement("IFRAME"); if (iframe) { //set iframe domain consistent with the web page iframe.src = 'javascript:void((function(){var d=document;d.open();d.domain="webdomain.com";d.write("");d.close()})())'; iframe.id = id; iframe.width = "1px"; iframe.height = "1px"; iframe.style.display = "none" } } if (body != null && body.appendChild && iframe) { body.appendChild(iframe); gads[id] = setInterval(function () { try { if (gads[id]) { clearInterval(gads[id]) } var iframeEle = document.getElementById(id), iframeEleDoc = iframeEle.contentWindow.document; alert(1); // dosomething in script iframeEleDoc.write('<!doctype html><ht'+'ml><bo'+'dy><scr'+'ipt>alert(2);</scr'+'ipt></bo'+'dy></ht'+'ml>'); //run to here, history forward is don't work. alert(3); window.setTimeout((function () { iframeEleDoc.close() }), 0) } catch (e) { alert(e) } }, 100) } }; </nowiki></pre> run to the "alert (1)", history forward showed normal, but run to the "alert (3)" when history forward display abnormal. where is the forward? And this phenomenon occurs only in firefox, other browsers have shown normal.

Modifié le par cor-el

Toutes les réponses (2)

more options

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.