2015年2月7日
摘要: 前置条件:申请微信发送红包的账户及其权限 依赖 blueimg-md5和 xmlreader 库 /common/weixin.js 源码/** * Created by chent696 on 2015/2/7./common/weixin.js *//* 拼接微信红包xml串 *//*se... 阅读全文
posted @ 2015-02-07 17:48 ia00.com 阅读(811) 评论(1) 推荐(0) 编辑
  2015年1月22日
摘要: 准备工作 1:准备nodejs环境 2:使用npm工具安装 socket.io npm install socket.io 3:下载客户端socket.io文件解压附件中的文件node app.js在浏览器中使用 http://localhost:127.0.0.1:8500 打开测试页面下载地址 ... 阅读全文
posted @ 2015-01-22 19:32 ia00.com 阅读(827) 评论(0) 推荐(0) 编辑
  2012年2月27日
摘要: ie系列浏览器本地预览一般采用 滤镜 DXImageTransform.Microsoft.AlphaImageLoader 实现,最近开发的一个项目在公司的开发机测试机上一切都正常,但是到了客户那里本地预览却一直报 "系统未找到指定资源" 查找了一上午,终于打开解决方案1:将站点添加到信任站点2:调整ie安全设置选项 将internet区域 设置下的 文件上载到服务器时包含本地目录路径勾选(详细位置请看截图) 阅读全文
posted @ 2012-02-27 11:55 ia00.com 阅读(214) 评论(0) 推荐(0) 编辑
  2011年6月21日
摘要: 参考网上写的客户端判断上传文件大小,opera无法支持 <!doctype html><html> <head> <meta charset = "gb2312" /> <script type="text/javascript"> function checkFileChange(obj) { var filesize = 0; if(navigator.userAgent.indexOf("MSIE")>0){ //if ie var filePath = obj. 阅读全文
posted @ 2011-06-21 13:21 ia00.com 阅读(379) 评论(0) 推荐(0) 编辑
  2011年4月12日
摘要: 来自我的javascript群 方法一var addEvent = (function () { if (document.addEventListener) { return function (el, type, fn) { el.addEventListener(type, fn, false); }; } else { return function (el, type, fn) { el.attachEvent('on' + type, function () { return fn.call(el, window.event); }); } }})();方法二va 阅读全文
posted @ 2011-04-12 21:57 ia00.com 阅读(483) 评论(0) 推荐(0) 编辑
摘要: 1、基本思想 假设待排序的记录存放在数组R[1..n]中。初始时,R[1]自成1个有序区,无序区为R[2..n]。从i=2起直至i=n为止,依次将R[i]插入当前的有序区R[1..i-1]中,生成含n个记录的有序区。<!doctype html><html> <head><title>javascript直接插入排序</title> <meta charset = "utf-8" /> </head> <body> <script> var arr = []; for 阅读全文
posted @ 2011-04-12 13:44 ia00.com 阅读(194) 评论(0) 推荐(0) 编辑
摘要: <!doctype html><html><head> <title>自动调整大小的textarea </title> <meta charset = "utf-8" /> <style type = "text/css"> .editable{cursor:text; font-size:13px; color:#003366;width:80px;line-height:20px;height:20px;font-family:Arial;cursor:text;*o 阅读全文
posted @ 2011-04-12 13:19 ia00.com 阅读(504) 评论(0) 推荐(0) 编辑
  2011年4月11日
摘要: 有1到100000共10万个数。从中随机抽走两个。再把原来的数字顺序打乱。如何快速找到被抽走的两个数 <!doctype html><html><head><title>排序</title></head> <body> <script> var len = 100000; var i; var arr = []; for(i=0; i<len; ++i) { arr[i] = i; //造10万条数据 } var num1 = arr.splice(8000,1); //随机取走两条数据 va 阅读全文
posted @ 2011-04-11 19:24 ia00.com 阅读(251) 评论(0) 推荐(0) 编辑
  2011年4月10日
摘要: <!doctype html><html> <head><title>javascript冒泡排序</title> </head> <body> <script type = "text/javascript" > var arr = [1,3,4,5,7,10,13,15,2]; var i = 0; var j = 0; var temp; var len = arr.length; for(;i<len;++i) { for(j=i+1;j<le 阅读全文
posted @ 2011-04-10 21:21 ia00.com 阅读(290) 评论(1) 推荐(0) 编辑
  2011年4月8日
摘要: 开发遇到过。在这里记录下。文章网址 http://www.imkevinyang.com/2010/01/document-referrer%E4%B8%A2%E5%A4%B1%E7%9A%84%E5%87%A0%E4%B8%AA%E5%8E%9F%E5%9B%A0.html 阅读全文
posted @ 2011-04-08 14:27 ia00.com 阅读(277) 评论(0) 推荐(0) 编辑