innerHTML doesn't work in IE11 and IE8

后端 未结 3 970
没有蜡笔的小新
没有蜡笔的小新 2021-01-14 03:39

I use these codes for refreshing a part of my page :

var container = document.getElementById(\"mainForm:table_1\");
var content = container.innerHTML;
contai         


        
3条回答
  •  失恋的感觉
    2021-01-14 04:36

    for first part of your question do this :

      var container = document.getElementById("mainForm:table_1").parentNode;
      var content = container.innerHTML
      container.innerHTML= content;
    

    and for second part of your question as @JITHIN PV said you must use history.js

    you can easily use it like this :

    var History = window.History;
    History.enabled ;
    History.pushState("object or string", "object or string", "object or string");
    

提交回复
热议问题