js实现字符串转换成unicode
来源:互联网 发布:mp280清零软件 编辑:程序博客网 时间:2024/05/21 13:59
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
function parseStandard(str){
if(str.length==1){
return "000"+str;
}else if(str.length==2){
return "00"+str;
}else if(str.length==3){
return "0"+str;
}else{
return str;
}
}
function encode(s){
var t='';
for(i=0;i<s.length;i++){
t+='\\u'+parseStandard(s.charCodeAt(i).toString(16));
}
alert(t);
var t=eval('\''+t.replace(/\\\\/g, '\\')+'\'');
alert(t);
}
</script>
</head>
<body onload="encode('asdfsd电饭锅的我@12')">
This is my JSP page. <br>
</body>
</html>
- js实现字符串转换成unicode
- JS中文字符串转换unicode编码函数
- JS中文字符串转换unicode编码函数
- UNICODE值转换成字符串
- Java:转换汉字为unicode形式的字符串和转换unicode形式字符串转换成汉字
- 转换汉字为unicode形式的字符串和转换unicode形式字符串转换成汉字
- Unicode 字符串的转换
- js unicode码转换成汉字
- js unicode转换工具
- 转换Unicode (JS)
- js Unicode编码转换
- UTF8编码字符串转换成Unicode编码字符串算法
- Python如何将Unicode中文字符串转换成 string字符串
- js中字符串转换成数组,数组转换成字符串的实现
- js字符串转换成数字与数字转换成字符串的实现方法
- js字符串转换成数字与数字转换成字符串的实现方法
- js字符串转换成数字与数字转换成字符串的实现方法
- js字符串转换成数字与数字转换成字符串的实现方法
- SSL 与 数字证书 的基本概念和工作原理
- 使用Eclipse构建Maven的SpringMVC项目(一)
- Mate(四)——扩展
- Spring--quartz中cronExpression配置说明
- 安卓开发之常见死机问题--log分析
- js实现字符串转换成unicode
- Android的jni的调用C,C++的几个应用(基本类型,数组,类(结构体))文档-源码
- arraycopy效率比较
- MtVerify.h 头文件内容,用的时候添加到工程就行了
- Java实现Immutable Class要点
- 关于wp7中http的GetResponse抛异常的问题
- android四大组件的 基本知识
- error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject'
- 如何将Android应用程序编译至image/rom中