<script> function subString(str, len, hasDot) { var newLength = 0; var newStr = ""; var chineseRegex = /[^\x00-\xff]/g; var singleChar = ""; var strLength = str.replace(chineseRegex,"**").length; for(var i = 0;i < st…
Chapter 1: What is Scope? 第一章:什么是作用域 One of the most fundamental paradigms of nearly all programming languages is the ability to store values in variables, and later retrieve or modify those values. In fact, the ability to store values and pull value…
// 验证中英文 function check_en_ch(_value){ var reg_en_num = /^[0-9A-Za-z\'\"\,\.\!\?\:\s|“|”|‘|’|!|"|.|?|:|.|,]+/; var reg_en_num_nonull = /[0-9A-Za-z\'\"\,\.\!\?\:|“|”|‘|’|!|"|.|?|:|.|,]/; var reg_container_en = /[A-Za-z]/; var reg_chinese = /^[0-9…