摘要: 因为 dataType 是 jsonp 而不是 json jsonp不支持POST跨域,所以会自动转成GET而关于jsonp为什么不支持post请求,百度到的答案是jsonp为动态的script,没有同源策略,所以只能是get知乎链接:https://www.zhihu.com/question/2 阅读全文
posted @ 2016-12-16 09:40 SingleShadow 阅读(4214) 评论(0) 推荐(0) 编辑
摘要: <a>github的提交方式 git status (1)git add . 存储到本地 git add -u git commit -m 'message' 存储时的标记(修改了哪些地方,方便下次查询) git pull 下载服务器代码 git push 上传代码至服务器 <b>svn服务器的提交 阅读全文
posted @ 2016-12-09 12:36 SingleShadow 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 实现方式:css div:empty:before{ content: attr(placeholder); color:#bbb;}div:focus:before{ content:none; } 阅读全文
posted @ 2016-12-09 12:34 SingleShadow 阅读(3032) 评论(0) 推荐(0) 编辑
摘要: var htmlEl = angular.element(document.querySelector('html')); htmlEl.on('click', function (event) { if (event.target.nodeName 'HTML') { if (myPopup) { 阅读全文
posted @ 2016-10-17 16:20 SingleShadow 阅读(2324) 评论(0) 推荐(0) 编辑
摘要: var stop=true;$(window).scroll(function(){ totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); if($(document).height() < 阅读全文
posted @ 2016-10-12 17:37 SingleShadow 阅读(2832) 评论(0) 推荐(0) 编辑
摘要: w3标准参数介绍 jsonp 类型:String 在一个 jsonp 请求中重写回调函数的名字。这个值用来替代在 "callback=?" 这种 GET 或 POST 请求中 URL 参数里的 "callback" 部分,比如 {jsonp:'onJsonPLoad'} 会导致将 "onJsonPL 阅读全文
posted @ 2016-10-09 16:28 SingleShadow 阅读(8868) 评论(0) 推荐(0) 编辑
摘要: 无需指定font-size的大小 阅读全文
posted @ 2016-10-09 14:47 SingleShadow 阅读(578) 评论(0) 推荐(0) 编辑
摘要: <title>汉字和Unicode编码互转</title><script Language=Javascript>var classObj= { ToUnicode:function(str) { return escape(str).replace(/%/g,"\\").toLowerCase() 阅读全文
posted @ 2016-10-09 14:40 SingleShadow 阅读(708) 评论(0) 推荐(0) 编辑
摘要: 没有设置高度而由内容撑高的子div在遇到固定高度的父div,想做一个离上边缘有间距的效果,给padding-top会同时撑大父div,给margin-top会把父div拉下来,这时候的子div像是紧紧黏在的父div上,这会儿就需要用overflow:hidden让子div脱离掌控,任意操作。 阅读全文
posted @ 2016-09-27 15:05 SingleShadow 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 执行app run的时候,android studio提示了这个问题,导致虚拟机没法用,这是因为电脑的Virtualization(虚拟化)没有打开导致的。但是有的电脑并没有这个功能,所以先下载个securable.exe确认下电脑是否有这个功能,securable下载及具体信息http://www 阅读全文
posted @ 2016-09-22 17:15 SingleShadow 阅读(1412) 评论(0) 推荐(0) 编辑