2018年9月

$('.dianhua').bind('input propertychange', function() {
            var val = $('.dianhua').val().trim();
            $('.dianhua').val(val);
            if(val){
                var phone = '';
                var regPos = /^\d+$/;
                for(var i=0;i<val.length;i++){
                    if(regPos.test(val[i])){
                        phone = phone+''+val[i];
                    }else{
                        $('.dianhua').val(phone);
                    }
                }

            }else{
                $('.dianhua').val('');
            }
        });

数据库报错信息:Syntax error or access violation: 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_.....

1、修改innodb_file_per_table和innodb_file_format
①登录数据库直接修改参数:

set global innodb_file_per_table=1

set global innodb_file_format=Barracuda

②修改配置文档my.cnf

[mysqld]

innodb_file_per_table = 1
innodb_file_format = Barracuda
2、将表ROW_FORMAT修改为DYNAMIC或COMPRESSED
ALTER TABLE table_name ROW_FORMAT=COMPRESSED

PS:不知道其他问题有没有,my.cnf里还加了(可忽略):
innodb_log_file_size = 256M
innodb_log_buffer_size = 400M

1、jQuery判断checked是否是选中状态的三种方法:
.attr('checked') // 返回:"checked"或"undefined" ;
.prop('checked') // 返回true/false(推荐!!!!!!!!!)
.is(':checked')  // 返回true/false //别忘记冒号哦
2、jQuery赋值checked的几种写法:(不建议用attr)
$("#cb1").prop("checked",true); //标准写法,推荐!
$("#cb1").prop({checked:true}); //map键值对    
$("#cb1").prop("checked",function(){
    return true;//函数返回true或false
});

1、引入:

jquery和js
<script src="path/to/jquery.min.js"></script>
<script src="path/to/circleChart.min.js"></script> 

2、使用一个div元素作为该圆形百分比进度条的HTML结构

<div class="circleChart" id="circle1"></div>

3、初始化插件

$(".circleChart").circleChart({
            size: 300,
            value: 50,
            text: 0,
            onDraw: function(el, circle) {
                circle.text(Math.round(circle.value) + "%"); // 根据value修改text
            }
        });
参数:
color: "#3459eb", // 进度条颜色
backgroundColor: "#e6e6e6", // 进度条之外颜色
background: true, // 是否显示进度条之外颜色
speed: 2000, // 出现的时间
widthRatio: 0.2, // 进度条宽度
value: 66,  // 进度条占比
unit: "percent",
counterclockwise: false, // 进度条反方向
size: 110, // 圆形大小
startAngle: 0, // 进度条起点
animate: true, // 进度条动画
backgroundFix: true,
lineCap: "round",
animation: "easeInOutCubic",
text: false, // 进度条内容
redraw: false,
cAngle: 0,
textCenter: true,
textSize: false,
textWeight: "normal",
textFamily: "sans-serif",
relativeTextSize: 1 / 7, // 进度条中字体占比
autoCss: true,
onDraw: false