event.stopPropagation() not working in firefox javascript
<p>event.stopPropagation() Does not work as it should be in the Firefox browser, but in Google Chrome or Internet Explorer or opera it is works well, the problem in Firefox browser when Clicking on btn_1 should show message btn_1  not show div1 .Is there another function or a solution to this problem? Gratefully</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;meta charset="utf-8"&gt;
&lt;meta name=viewport content="width=device-width, initial-scale=1"&gt;
&lt;title&gt;Hello!&lt;/title&gt;
&lt;style type="text/css"&gt;
  &lt;!-- body {
    text-align: center;
  }
  #main {
    position: absolute;
    height: 400px;
    width: 600px;
    border: 1px solid black;
    left: 400px;
  }
  #btn1 {
    position: absolute;
    height: 30px;
    width: 200px;
    border: 1px solid black;
    left: 500px;
    top: 420px;
  }
  #btn2 {
    position: absolute;
    height: 30px;
    width: 200px;
    border: 1px solid black;
    left: 800px;
    top: 420px;
  }
  #div1 {
    height: 100px;
    width: 100%;
    background-color: #FF3399;
  }
  #div2 {
    height: 100px;
    width: 100%;
    background-color: #99FF00;
    position:relative;
  }
  #div3 {
    height: 100px;
    width: 100%;
    background-color: #00CC99;
  }


  --&gt;
&lt;/style&gt;
&lt;script&gt;
  function addElement2() {

    var element = document.getElementById("main");
    while (element.firstChild) {
      element.removeChild(element.firstChild);
    }

    var newContent = 0;


    for (var i = 0; i &lt;= 2; i++) {


      newContent = newContent + 1;

      var divname = "div" + newContent;
      var divname2 = "div" + newContent;
      var Content_text = "newContent" + newContent;


      divname = document.createElement("div");
      document.getElementById("main").appendChild(divname);
      Content_text = document.createTextNode(divname2);

      divname.id = divname2.toString().trim();
      divname.appendChild(Content_text);

        var btn = document.createElement("BUTTON")
           document.getElementById(divname2.toString().trim()).appendChild(btn);

                 var btn_id=  "btn_" + newContent;
                    btn.id =btn_id;




   var  Content_text2 = document.createTextNode("btn_" + newContent);
    btn.appendChild(Content_text2);
       btn.onclick =  function(){delete_cooke1(this) ;} ;
        divname.onclick =  function(){go_to(this) ;} ;

    }
  }

  function delete_cooke1(mmm){
             event.stopPropagation();
        var str =    mmm.id.toString() ;

              alert(str);
               return;
             }


    function go_to(mmm){

        var str =    mmm.id.toString() ;

              alert(str);
               return;
             }



&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
  &lt;div id="main"&gt;&lt;/div&gt;
  &lt;button id="btn1" onclick="addElement2()"&gt;1-Create 3 divs&lt;/button&gt;

&lt;/body&gt;

&lt;/html&gt;</code></pre>
</div>
</div>
</p>