随笔分类 - JS
摘要:PHP: 对应->>>>JS: 编码:base64_encode($string); 编码:btoa(encodeURI($string)); 解密:base64_decode($string); 解密:decodeURI(atob(string));
阅读全文
摘要:如果a.com发送 ajax请求到 b.com 正常用jsonp 是能发送get请求, 可是我们有的时候要用到POST请求 只需要在 b.com中加上
阅读全文
摘要:var isAjax=false; $('#count_down').click(function(){ if(isAjax){ return; } isAjax=true; var _phone = $('#phone_number').val(); if(_phone...
阅读全文
摘要:解决方法: 1、单张图片:修改ueditor.all.js(ueditor.all.min.js)第24429行左右,将accept的值从image/*改成 image/jpeg,image/png,image/jpg,image/gif,image/bmp accept="image/jpeg,i
阅读全文
摘要:图片服务器代码 前台代码 php代码 上传文件curl
阅读全文
摘要:HTML5上传图片预览 请选择图片文件:JPG/GIF
阅读全文
摘要:链接 http://www.jq22.com/jquery-info318 Html Js Php
阅读全文
摘要:连接地址 http://www.uploadify.com/demos/
阅读全文
摘要:http://echarts.baidu.com/index.html
阅读全文
摘要:String.prototype.isEmpty = function () { var s1 = this.replace(/[\r\n]/g, '').replace(/[ ]/g, ''), s2 = (s1 == '') ? true : false; return s2; }; $(this).html().isEmpty();
阅读全文
摘要://这样写没有效果 $(".xx").clcik(function(){····}); //改成这样写 $(document).on('click', '.xxx', function(e){ });
阅读全文
摘要:var Cts = "bblText"; if(Cts.indexOf("Text") > 0 ) { alert('Cts中包含Text字符串'); }
阅读全文
摘要:var obj={"name":"wjy","age":26,"sex":"female"};//定义一个object对象 var keys=[];//定义一个数组用来接受key var values=[];//定义一个数组用来接受value for(var key in obj){ keys.push(key); values.push(obj[key]);//取得valu...
阅读全文
摘要:openid = openid.substring(0,openid.length-1)
阅读全文
摘要:var s = "abc,abcd,aaa"; ss = s.split(",");// 在每个逗号(,)处进行分解
阅读全文
摘要:var a, b; a = new Array(0,1,2,3,4); b = a.join("-");
阅读全文