jquery前端常見資料驗證

2021-10-05 07:35:30 字數 990 閱讀 1846

//驗證移動手機號碼

function isphoneno(phone) $/; //驗證手機號碼

return reg.test(phone) ;

}//固定**驗證

function isfixedphone(phone))-)(\d)(-(\d))?katex parse error: undefined control sequence: \d at position 39: …var rex2= /^((0\̲d̲))(\d…/; //驗證固定**中間不帶有橫線

return rex1.test(phone) || rex2.test(phone)

}//驗證固定+移動**號碼

function isphoneall(phone)

//郵箱驗證:

function isemail(email)

.[0-9].[0-9].)|(([\w-]+.)+))([a-za-z]|[0-9])(]?)/;

return reg.test(email);

}//qq驗證:

function isqq(qq)

$/i;

return reg.test(qq);

}$/;

return reg.test(wx);

}//郵編驗證

function iscode(code)

$/;return reg.test(code);

}//驗證身份證

function iscardno(card) $)|(^\d$)|(\d(\d|x|x)$)/;

return pattern.test(card);

}//在乙個js檔案中引入另外乙個js檔案

document.write("<\/script>");
//去掉前後空格

jquery.trim()

1-9 ↩︎

a-za-z0-9_ ↩︎

0-9 ↩︎

常見資料集

有幾個資料集常常聽到,但時間一長就容易混淆忘記,現記錄如下。持續更新。全稱the pascal visual object classes,也可簡稱voc。主題 目標分類 版本 該競賽現已結束 主題 識別 分割 版本 介紹 首先是每年的競賽 coco競賽從2015年開始,最初的競賽內容是detect...

常見資料集

官網 映象 pascal voc 挑戰賽主要有 object classification object detection object segmentation human layout action classification 這幾類子任務 pascal voc 2007 和 2012 資料...

常見資料驗證正規表示式

只能輸入數字 0 9 只能輸入n位的數字 d 只能輸入至少n位數字 d 只能輸入m n位的數字 d 只能輸入零和非零開頭的數字 0 1 9 0 9 只能輸入有兩位小數的正實數 0 9 0 9 只能輸入有1 3位小數的正實數 0 9 0 9 只能輸入非零的正整數 1 9 0 9 只能輸入非零的負整數 ...