2022年9月9日

Validator表单验证1.05@我佛山人【经典】

摘要: <table align="center"> <form name="theForm" id="demo" method="get" onSubmit="return Validator.Validate(this,2)"> <tr> <td>身份证号:</td> <td><input name=" 阅读全文

posted @ 2022-09-09 15:20 小馬過河﹎ 阅读(51) 评论(0) 推荐(0)

CSS清除浮动三件套

摘要: 将样式定义在浮动元素们的父层 .parent::after{ content:""; display:block; clear:both; } 阅读全文

posted @ 2022-09-09 15:13 小馬過河﹎ 阅读(55) 评论(0) 推荐(0)

CSS单行文本溢出显示…三件套

摘要: p{ width:100px; height:20px; /*三件套*/ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } 阅读全文

posted @ 2022-09-09 15:13 小馬過河﹎ 阅读(42) 评论(0) 推荐(0)

CSS段落两端对齐 / 长文本自动换行

摘要: Examples 1 p{ text-align: justify; text-justify: inter-ideograph; } Examples 2 p{ word-wrap: break-word; word-break: normal; } 阅读全文

posted @ 2022-09-09 15:12 小馬過河﹎ 阅读(119) 评论(0) 推荐(0)

开启MYSQL慢查询

摘要: 在安装根目录下my.ini加入两行(5.5以上版本) slow_query_log = ON long_query_time = 1 重启MySQL >net stop mysql >net start mysql 查看配置 SHOW VARIABLES LIKE '%slow_query_log% 阅读全文

posted @ 2022-09-09 15:11 小馬過河﹎ 阅读(15) 评论(0) 推荐(0)

jQuery全选/全不选

摘要: HTML <input type="checkbox" id="checkAll">全选/全不选 <input type="checkbox" name="item[]" value="1">item1 <input type="checkbox" name="item[]" value="2">i 阅读全文

posted @ 2022-09-09 15:07 小馬過河﹎ 阅读(34) 评论(0) 推荐(0)

jQuery判断复选框是否被选中

摘要: DOM方式判断 var $cr=$('#cr') var cr=$cr[0] $cr.click(function(){ if(cr.checked){ alert('复选框被选中了') } }) jQuery方式判断 var $cr=$('#cr') $cr.click(function(){ i 阅读全文

posted @ 2022-09-09 15:03 小馬過河﹎ 阅读(21) 评论(0) 推荐(0)

jQuery导出HTML表格到Excel|jquery.table2excel.js的用法

摘要: Examples $(function(){ $('#btn').click(function(){ $('#tb').table2excel({ exclude:'.noExcl', //标记不导出行的CSS,用到td上会导致后面的td前移 name:'ExcelDocumentName', // 阅读全文

posted @ 2022-09-09 15:01 小馬過河﹎ 阅读(1948) 评论(0) 推荐(0)

jquery-select多选

摘要: 文档 https://multiple-select.wenzhixin.net.cn/ Examples <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>MULTIPLE SELECT</title> <script src= 阅读全文

posted @ 2022-09-09 14:57 小馬過河﹎ 阅读(26) 评论(0) 推荐(0)

flex结合margin:auto定义包含项目居中显示

摘要: margin:auto;在伸缩盒中具有强大的功能,一个定义为“auto”的margin会合并剩余的空间,它可以用来把伸缩项目挤到其它位置。 Examples <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style> body{ marg 阅读全文

posted @ 2022-09-09 14:55 小馬過河﹎ 阅读(41) 评论(0) 推荐(0)

背景图像完全覆盖元素区域

摘要: Examples <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>背景图像完全覆盖元素区域</title> <style> div{ margin:2px; float:left; border:1px solid red; b 阅读全文

posted @ 2022-09-09 14:53 小馬過河﹎ 阅读(23) 评论(0) 推荐(0)

javascript|jQuery清除input空格

摘要: Examples $(function(){ //表单去空格 $("input").bind('blur keyup',function(){ $(this).val($(this).val().replace(/\s*/g,'')) }) }) 阅读全文

posted @ 2022-09-09 14:51 小馬過河﹎ 阅读(27) 评论(0) 推荐(0)

PHP日期遍历/年月遍历

摘要: ### 日期遍历 ```php function date_range($date1,$date2){ $timestamp1=strtotime($date1); $timestamp2=strtotime($date2); $days=($timestamp2-$timestamp1)/8640 阅读全文

posted @ 2022-09-09 11:43 小馬過河﹎ 阅读(153) 评论(0) 推荐(0)

PHP转码函数iconv

摘要: iconv ( string in_charset, string out_charset, string str ) //忽略错误 $str=iconv('GBK','UTF-8//IGNORE',$str); 阅读全文

posted @ 2022-09-09 11:37 小馬過河﹎ 阅读(20) 评论(0) 推荐(0)

ThinkPHP $this->error 关闭页面

摘要: $this->closeWin=1; $this->error('用户名或密码错误'); 阅读全文

posted @ 2022-09-09 11:36 小馬過河﹎ 阅读(25) 评论(0) 推荐(0)

PHP截取指定两个字符之间字符串

摘要: function get_between($input,$start,$end){ return substr($input,strlen($start)+strpos($input,$start),(strlen($input)-strpos($input,$end))*(-1)); } 阅读全文

posted @ 2022-09-09 11:35 小馬過河﹎ 阅读(421) 评论(0) 推荐(0)

CSS下拉菜单

摘要: <ul class="nav"> <li><a href="/">首页</a></li> <li class="drop-down"> <a href="javascript:;">出售房源</a> <ul class="drop-down-content"> <li><a href="/Sell" 阅读全文

posted @ 2022-09-09 11:34 小馬過河﹎ 阅读(23) 评论(0) 推荐(0)

PHP ip2long() 出现负数的解决方法

摘要: function ip_long($ip=0){ return sprintf('%u',ip2long($ip)); } 阅读全文

posted @ 2022-09-09 11:32 小馬過河﹎ 阅读(26) 评论(0) 推荐(0)

javascript 把日期字符串替换成数字串

摘要: datetimeStr.replace(/ |:|-/g,'') 阅读全文

posted @ 2022-09-09 11:30 小馬過河﹎ 阅读(41) 评论(0) 推荐(0)

php将textarea内容根据换行转换数组

摘要: $arr=explode("\r\n",I('textarea')); 阅读全文

posted @ 2022-09-09 11:30 小馬過河﹎ 阅读(278) 评论(0) 推荐(0)

导航