In [8]: import string In [9]: dir(string) In [10]: string.ascii_letters Out[10]: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' In [11]: string.ascii_lowercase Out[11]: 'abcdefghijklmnopqrstuvwxyz' In [12]: string.ascii_uppercase Out[12]: 'AB
Js代码 <script type="text/javascript"> function SubmitCk() { var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; if (!reg.test($("#txtEmail").val())) { alert("请输入正确邮箱地址&quo
<script type="text/javascript"> function validate(){ var reg = new RegExp("^[0-9]*$"); var obj = document.getElementById("name"); if(!reg.test(obj.value)){ alert("请输入数字!"); } if(!/^[0-9]*$/.test(obj.value)){ a
1.<script type="text/javascript"> 2. function validate(){ 3. var reg = new RegExp("^[0-9]*$"); 4. var obj = document.getElementById("name"); 5. if(!reg.test(obj.value)){ 6. alert("请输入数字!&q
<script type="text/javascript"> function validate(){ var reg = new RegExp("^[0-9]*$"); var obj = document.getElementById("name"); if(!reg.test(obj.value)){ alert("请输入数字!"); } if(!/^[0-9]*$/.test(obj.value)){ a
<script type="text/JavaScript"> function validate(){ var reg = new RegExp("^[0-9]*$"); var obj = document.getElementById("name"); if(!reg.test(obj.value)){ alert("请输入数字!"); } if
转:http://blog.csdn.net/dxnn520/article/details/8267173 var定义的变量应该是字符串,有时没有经过类型转换而进行比较的话,小于十的话还可以,如果大于十就会出错 例: var hour_select_begin=$('#hour_select_begin option:selected').text(); var hour_select_end=$('#hour_select_end option:selected').text(); if(h
<script type="text/javascript"> function SubmitCk(num) { var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; if (!reg.test($("#txtEmail").val())) { alert("数字串正则测试")
正则验证数字的方法: <script type="text/javascript"> function validate(){ var reg = new RegExp("^[0-9]*$"); var obj = document.getElementById("name"); if(!reg.test(obj.value)){ alert("请输入数字!"); } if(!/^[0-9]*$/.test(obj