JavaScript escape() 返回经过重新编码过的字符串。转自Vnde.cn

escape()格式

   escape(String)

escape()参数

    String 必填。String 对象或文字。

注意:

  escape()只编译符号和中文 英文则原样输出

测试代码:

<script type="text/javascript">
 document.write("测试字符串<font color=\"#FF0000\">Javascript escape函数</font> 编码后<font color=\"#FF0000\">");
 document.write(escape("Javascript escape函数"));
 document.write("</font><br>");
</script>

运行结果:
测试字符串Javascript escape函数 编码后Javascript%20escape%u51FD%u6570

相关文章:

  • 1970-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
  • 2021-05-31
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-14
  • 2022-12-23
  • 2022-01-11
  • 2021-11-23
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案