摘要:
1.引入文件2.启动//验证$("#form1").validationEngine();//提交$("#submit").click(function(){$("#form1").submit();});3.为元素添加验证添加一个">添加多个">添加自定义function validate2fields(){ if($("#firstname").val() =="" || $("#lastname").val() == "&quo 阅读全文
摘要:
form-validation-engine是一个不错的表单验证,可以玩玩。(function($) { $.fn.validationEngineLanguage = function() {}; $.validationEngineLanguage = { newLang: function() { $.validationEngineLanguage.allRules = {"required":{ // Add your regex rules here, you can take telephone... 阅读全文
摘要:
我们可以把经常用到的函数封装起来,在抽象类中,然后继承来使用。/** * 时间转时间戳 * @param object $str * @return timestamp */ function toTime($str, $flag = false) { $year = substr($str, 0, 4); $month = substr($str, 5, 2); $day = substr($str, 8, 2); $hour = substr($str, 11, -3); $min... 阅读全文