只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-04-15 14:51 YGCool 阅读(18) 评论(0) 推荐(0) 编辑
摘要: var i = 0; $("input[name='checkbox[]']:checked").each(function(){ i++; }); if(i<1){ //如果i=0 证明没有选中一个checkbox alert("您没有勾选任何计划"); return false; } 阅读全文
posted @ 2016-04-15 14:37 YGCool 阅读(170) 评论(0) 推荐(0) 编辑
摘要: update cnmat_video set hits=FLOOR(1 + (RAND() * 50)) 给定一个1-50中间的随机数 阅读全文
posted @ 2016-04-15 14:36 YGCool 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 1箱起批 2箱起批 3箱起批 var v_wholesale_one = $(“:radio[name='wholesale_one'][checked]“).val(); 阅读全文
posted @ 2016-04-15 14:35 YGCool 阅读(583) 评论(0) 推荐(0) 编辑
摘要: SELECT * FROM `ecs_user_bonus` WHERE by_userid is null 阅读全文
posted @ 2016-04-15 14:33 YGCool 阅读(1251) 评论(0) 推荐(0) 编辑
摘要: 有的网站中不允许用户复制、粘贴、剪切文本框中的内容的,是怎么实现的呢?看看下面的代码就知道了。 阅读全文
posted @ 2016-04-15 14:33 YGCool 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 代码下载 阅读全文
posted @ 2016-04-15 14:32 YGCool 阅读(92) 评论(0) 推荐(0) 编辑
摘要: UTF-8截取中文字符串 function Cn_Substr($string, $length) { preg_match_all("/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xef][\x80-\xbf][\x80-\xbf]|\xf0[\x90-\xbf][\x80-\x... 阅读全文
posted @ 2016-04-15 14:31 YGCool 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 复制字段里的数据命令: SQL代码 UPDATE table SET 被替换的字段名=被复制的字段名 演示如下 SQL代码 UPDATE dede_archives SET senddate=pubdate 如何手动将同一数据表内不同字段之间的内容批量转换,可以参考下面的命令: SQL代码 UPDATE table set 字段名=REPLACE(字段名,'原字符串','替换的字符串'... 阅读全文
posted @ 2016-04-15 14:30 YGCool 阅读(1014) 评论(0) 推荐(0) 编辑
摘要: 在编辑器或者文本框中按住数字或字母不放 当字符很长时,就会撑破页面, 可以用一下方法控制字符自动换行 style="word-break:break-all;" 阅读全文
posted @ 2016-04-15 14:30 YGCool 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 1 0){ // 屏蔽第一帧 54 for ($k = 0; $k GetAnimation(); 88 } 89 90 91 /** 92 * GIFEncoder类 93 * */ 94 class GIFEncoder { 95 var $GIF = "GIF89a"; /* GIF h... 阅读全文
posted @ 2016-04-15 14:28 YGCool 阅读(951) 评论(0) 推荐(0) 编辑
摘要: PHPExcel中就有这样的方法:PHPExcel_Shared_Date::ExcelToPHP($value) 。可以直接使用。 然后将得到的结果用data函数就可以转换成日期了。 阅读全文
posted @ 2016-04-15 14:27 YGCool 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 最近利用Apache 实现了一个http服务,发布到linux下发现无法访问,通过telnet来检测连接,发现端口没开。 原来是因为linux下没有开启对80的端口访问权限造成的。通过下面的命令可以开启允许对外访问的网络端口: /sbin/iptables -I INPUT -p tcp --dpo 阅读全文
posted @ 2016-04-15 14:27 YGCool 阅读(531) 评论(0) 推荐(0) 编辑
摘要: js页面 $.ajax({ type: “POST”, dataType: ‘json’, url: “add_vote.php”, data: “touid=”+uid+”&tousername=”+username, success: function(msg){ //json解析方法一 var dataObj=eval("("+msg+")"... 阅读全文
posted @ 2016-04-15 14:25 YGCool 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 全选 …… 阅读全文
posted @ 2016-04-15 14:24 YGCool 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 代码下载 阅读全文
posted @ 2016-04-15 14:22 YGCool 阅读(124) 评论(0) 推荐(0) 编辑
摘要: php通过$_SERVER['HTTP_USER_AGENT']获取浏览器useAgent 阅读全文
posted @ 2016-04-15 14:21 YGCool 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 代码下载 阅读全文
posted @ 2016-04-15 14:20 YGCool 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 在 http://ip.qq.com/ 的网站中有QQ自己的JS省市区三级联动 QQ是使用引用外部JS来实现三级联动的。JS如下:http://ip.qq.com/js/geo.js 阅读全文
posted @ 2016-04-15 14:18 YGCool 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 解压压缩包里的Classes文件夹中的内容到application\libraries\目录下,目录结构如下:--application\libraries\PHPExcel.php--application\libraries\PHPExcel(文件夹)修改application\librarie 阅读全文
posted @ 2016-04-15 14:16 YGCool 阅读(2162) 评论(0) 推荐(0) 编辑