最近使用WEUI的一些小結

2021-08-08 21:47:19 字數 2251 閱讀 5677

class="referrow">

class="referl">

for=""

class="weui-label">class="space">轉入日期

div>

class="weui-cell__bd">

"text"

div>

div>

//獲取當天的日期

var odate = new

date();

var year = odate.getfullyear();

var month = odate.getmonth()+1;

var day= odate.getdate();

var jintian=year+"/"+month+"/"+day;

var jintianarr=;

jintianarr.push(jintian);

//設定預設值(頁面初始化值)

//初始化日曆控制項

multiple:false,// 是否多選

inputreadonly:true,// 是否自動在 input 元素上加上唯讀屬性

dateformat:'yyyy/mm/dd',//日期格式

mindate:jintian,//最小值

daynames:['週日', '周一', '周二', '週三', '周四', '周五', '週六'] ,

monthnames:['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']

});

weui的官網api**:

//判斷名字是否含特殊字數

checkname=function

(name)$/))else

}

//驗證身份證

checkcardid=function

(sid)(\d|x)$/i.test(sid)) return

false;

sid=sid.replace(/x$/i,"a");

if(parseint(sid.substr(0,2))==null) return

false;

var sbirthday=sid.substr(6,4)+"-"+number(sid.substr(10,2))+"-"+number(sid.substr(12,2));

var d=new

date(sbirthday.replace(/-/g,"/")) ;

if(sbirthday!=(d.getfullyear()+"-"+ (d.getmonth()+1) + "-" + d.getdate()))return

false;

for(var i = 17;i>=0;i --) isum += (math.pow(2,i) % 11) * parseint(sid.charat(17 - i),11) ;

if(isum%11!=1) false;

return

true;

}

//驗證手機號碼

checkphone=function

(phone)$/.test(phone))else

}

我這的html結構:

class="weui-cell">

class="weui-cell__hd">for=""

class="weui-label">

class="red space">*聯絡**

div>

class="weui-cell__bd">

class="weui-input"

name="contact"

div>

div>

//增加錯誤提示

adderror=function(e));

}//移除錯誤提示

removeerror=function(e)

$(e).css();

}

效果圖:

$.toast("操作成功!");

settimeout(function

() ,1000);

nginx fast cgi 一些小結

fpm children make line 352 child 20477 pool default started fpm event loop line 105 libevent entering main loop 的解決方案 這個問題是系統最大開啟檔案數與php fpm設定不一樣所致 1....

Perl Perl module的一些小結

perl module 關於perl module改如何使用,如何編寫,現在初步有一些膚淺的體會,總結如下 1.如何引用不在系統預設路徑中的module?方法1 使用lib use lib qw your path to module 貌似這幾乎等價於begin 方法2 修改 inc begin u...

Perl module的一些小結收藏

perl module 關於perl module改如何使用,如何編寫,現在初步有一些膚淺的體會,總結如下 1.如何引用不在系統預設路徑中的module?方法1 使用lib use lib qw your path to module 貌似這幾乎等價於begin 方法2 修改 inc begin u...