![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JS
诗和远方C
这个作者很懒,什么都没留下…
展开
-
js byte[] 和string 相互转换 UTF-8
https://blog.csdn.net/u013022210/article/details/55101558/function stringToByte(str) {var bytes = new Array();var len, c;len = str.length;for(var i = 0; i < len; i++) {c = str.charCodeAt(i);...转载 2019-03-04 13:42:36 · 923 阅读 · 0 评论 -
js实现简单的有序map
原文:https://blog.csdn.net/themagickeyjianan/article/details/85608721function SortMap(){ this._map = {};} SortMap.prototype.add = function(key, value){ this._map[key] = value;} SortMap.pr...转载 2019-07-03 11:42:42 · 1592 阅读 · 0 评论 -
WebSocket的实现方式
https://blog.csdn.net/weixin_40620337/article/details/8089818var ws = new WebSocket(url,[protocol]);//url:指定连接的服务器,protocol:可接受的子协议。var ws = new WebSocket(“ws://”+location.host+"/websocket/"+用户ID);/...原创 2019-08-12 14:01:04 · 1017 阅读 · 0 评论