• js unicode处理


    //岗位详细界面
    var str="1、u000Du21B52、u000Du21B53";
    
    var pad = function() {
     var tbl = [];
     return function(num, n) {
      var len = n-num.toString().length;
      if (len <= 0) return num;
      if (!tbl[len]) tbl[len] = (new Array(len+1)).join('0');
      return tbl[len] + num;
     }
    }();
    
    setValue_Instructions(str);
    
    console.log(str)
    console.log("---------------------")
    console.log(getValue_Instructions());
    
    
     "u21B5".charCodeAt(0).toString(16)
    --------------------------------------------------------------
    
     "u21B5".charCodeAt(0).toString(16)
    
    
    
    String.fromCharCode(72,69,76,76,79)
    
  • 相关阅读:
    Mysql优化之Explain查询计划查看
    map转listmap
    代码大全
    cas
    日志
    xml模板
    springboot
    日志
    spring应用
    拆分表中sheet
  • 原文地址:https://www.cnblogs.com/gaocong/p/7284265.html
Copyright © 2020-2023  润新知