zoukankan      html  css  js  c++  java
  • FineReport 导出汉字乱码

    window.location.href = "<%=reportPath_F%>help06042Report.cpt&showtoolbar=false&bypagesize=false&beginTime="+beginTime4+"&op=export&format=excel&filename="+cjkEncode("报障咨询情况及占比率");
    function cjkEncode(text) {
    if (text == null) {
    return "";
    }
    var newText = "";
    for (var i = 0; i < text.length; i++) {
    var code = text.charCodeAt(i);
    if (code >= 128 || code == 91 || code == 93) {//91 is "[", 93 is "]".
    newText += "[" + code.toString(16) + "]";
    } else {
    newText += text.charAt(i);
    }
    }
    return newText;
    }

  • 相关阅读:
    3-1
    3-2
    习题二 8
    习题二 3
    习题二 5
    习题二 4
    习题二 6
    实验三-2未完成
    实验三
    心得
  • 原文地址:https://www.cnblogs.com/chonghaojie/p/9098513.html
Copyright © 2011-2022 走看看