
js
harryhare
这个作者很懒,什么都没留下…
展开
-
js 发送http请求
最简单的方法自然是jquery$.get();$.post();//examplevar params = {id:1,name:'tom'};url = '/test_post.php';$.post(url,params,function(data){ alert(data);//这个data就是test_post.php返回的数据});但是有的网站并没有加载...原创 2018-03-11 21:19:25 · 34411 阅读 · 0 评论 -
js 入门
let const 区别:https://cloud.tencent.com/developer/article/1413558原创 2019-04-22 00:46:14 · 123 阅读 · 0 评论 -
js escape, encodeURI, encodeURIComponect 区别
参考:https://www.cnblogs.com/huaxingtianxia/p/7125862.html一个例子:escape("https://test.com?query=猪")"https%3A//test.com%3Fquery%3D%u732A"encodeURI("https://test.com?query=猪")"https://test.原创 2019-02-24 21:02:20 · 667 阅读 · 0 评论 -
js 获取视频长度
参考:https://stackoverflow.com/questions/29285056/get-video-duration-when-input-a-video-filefunction _getVideoDuration(file, callback) { const video = document.createElement('video'); video.pre...原创 2019-02-24 00:25:04 · 1085 阅读 · 0 评论 -
四种 post 请求格式的XMLHttpRequest 写法
<!DOCTYPE html><head> <head> <meta charset="UTF-8"> <script&am原创 2018-06-22 20:12:26 · 28223 阅读 · 3 评论 -
json object 序列化和反序列化
JSON.stringify( ) 和 JSON.parse( ) 的比较详细的例子, 关注下第二个参数(过滤数组,函数)和第三个参数(缩进): https://blog.youkuaiyun.com/eliosa/article/details/68108293转载 2018-08-23 07:43:51 · 3707 阅读 · 0 评论 -
preventDefault,stopPropagation及return false的区别
参考下面两篇,这两篇都有很详细的例子和解析: https://blog.youkuaiyun.com/wxl1555/article/details/53128966 https://segmentfault.com/a/1190000008227026总结一下,几个独立的概念: 1.event的传播方向 从上到下 和 从下到上 其中 从下到到上 就是bubble , 是addEventList...原创 2018-08-22 22:08:22 · 210 阅读 · 0 评论 -
redux 和 cerebral 的区别
https://gist.github.com/christianalfoni/e8dc5bfa79e7289a6258转载 2018-07-29 23:38:50 · 263 阅读 · 0 评论 -
js cookie
其实就是对document.cookie 的字符串操作参考 1.http://www.w3school.com.cn/js/js_cookies.asp 2.https://www.cnblogs.com/endv/p/8089506.html转载 2018-05-24 21:20:25 · 115 阅读 · 0 评论 -
XMLHttpRequest 发 Post 请求
0. 使用XMLHttpRequest时,直接在send 函数中写字符串,和 使用formData是不用的function send(userid,name,node,href,asyn) { var xmlhttp=new XMLHttpRequest(); var url=url_ban; ////直接send字符串或者json串 //var conte...原创 2018-05-24 21:04:20 · 8503 阅读 · 1 评论 -
js 内存 和 chrome 控制台的使用
https://www.oschina.net/question/253614_2216515转载 2019-04-19 14:20:13 · 365 阅读 · 0 评论