代码如下:

  //Oracle Varchar2 一个中文对应3个Byte,所以用3个x替换
    var commentValue = commentValue.replace(/[^\x00-\xff]/g, "xxx");
    if (commentValue.length > 500) {
        alert("Max length is 150 Chinese or 500 English");
        return false;
    }

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
猜你喜欢
  • 2021-11-26
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-06-05
  • 2021-11-06
相关资源
相似解决方案