JS rem 设置
摘要:(function () { var docEl = document.documentElement; var resize = 'orientationchange' in window ? 'orientationchange' : 'resize'; var setRem = function () { var screenWidth = docEl.clientWidth ...
阅读全文
时间格式转换
摘要:// 时间格式转换(毫秒转换成日期格式) function dateFormat () { if (formmat == '' || formmat == undefined || formmat == null) { formmat = 'yyyy-MM-dd'; } var t = new Date(time); var tf = function () { return ...
阅读全文
数据交互 -- 初始化省市区
摘要:// 初始化省 function init_province () { var province_str = ''; province_str += '全国'; for ( var o in provs_data ) { province_str += ''+provs_data[o].text+'' } $(".grade-province").html(province_s...
阅读全文
JS 信息提示弹框封装
摘要:// 功能提示弹框 function tipsBox ( option ) { var html = ''; if ( option.type == 'success' ) { html += ''+ option.message +''; } else if ( option.type == 'error' ) { html += ''; html += '' + opt...
阅读全文
JS 功能弹框封装
摘要:// 功能提示弹框 function messageBox ( option ) { var html = ''; html += '' + option.title; html += ''; if ( option.type == 'using' ) { html += ''; html += '' + option.content + ''; html += '';...
阅读全文
css3 弹框提示样式
摘要:.common-dialog-box{ opacity: 0; filter: alpha(opacity=0); position: fixed; top: 0%; left: 50%; z-index: 1000; width: 500px; height: 50px; line-height: 50px; margin-left: -250px; border-rad...
阅读全文
css3 弹框功能样式
摘要:.message-box{ position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, 0.3); visibility: hidden; } .message-box, .message-box-main, .btn{ transition: all 0.5s; ...
阅读全文
前后数据交互(ajax) -- 初始化页面表格
摘要://$tr.append($td1); //$tr.append($td2); //$tr.append($td3); //$tr.append($td4); //$tr.append($td5); //$tr.append($td6); //$tr.append($td7);
阅读全文
数据交互 ajax 初始化省
摘要:1 //初始化省 2 function initProvince() { 3 if( areaLvel == 0 ) { 4 return; 5 } 6 // 清空option 7 $("#select_province").html(''); 8 9 $.ajax({ 10 type: 'GE...
阅读全文
JS form表单图片上传
摘要:1 // 点击file 类型的input 触发的方法 2 3 function changesProvider(){ 4 5 // fileProvider -> input中的name属性值 6 7 var f = document.getElementByName("fileProvider")[0].files; 8 9 // 图片大小判断 10 ...
阅读全文