function dd_hh() { var res = str.split("/"); var text = ""; for (index = 1; index < res.length; index++) { //-------- var str1 = res[index]; var res1 = str1.split("(#)"); var text1 = ""; for (index1 = 1; index1 < res1.length; index1++) { text1 +="
  • "+ res1[index1] +"

  • "; } //-------- text +="
    "+index+res1[0]+"
      "+text1+"
    "; } document.getElementById("demox").innerHTML =text; }