两个比较好用的函数 /** *中文判断 *@paramstring$str要检测的字符串 *@returnmixed */ functionisAllChinese($str) { if(preg_match('/^[\x7f-\xff]+$/',$str)){ //全是中文 returntrue; }...
由于jQuery中,提交表单是像下面这样的 $('#myform').submit() 所以,想当然的认为,重置表单,当然就是像下面这样子 $('#myform').reset() 但是,不幸的是,这样写的话,会有一个让你很郁闷...