上一页 1 ··· 12 13 14 15 16

2014年1月2日

jquery插件参数传递

摘要: 当传递的参数在函数中未定义时,不会报错,但也不会发生作用,这会造成怎么传递参数不起作用的困惑。 阅读全文

posted @ 2014-01-02 10:04 左小兵 阅读(191) 评论(0) 推荐(0) 编辑

2014年1月1日

我今天也学习了做jquery插件

摘要: 先贴代码(function ( $ ) { var id=33;$.fn.validate=function(options){ // This is the easiest way to have default options. var settings = $.extend({ // These are the defaults. color: "#556b2f", backgroundColor: "white" }, options ); // Greenify the collection based on t... 阅读全文

posted @ 2014-01-01 20:31 左小兵 阅读(121) 评论(0) 推荐(0) 编辑

2013年12月31日

php(验证网址是否存在)错误

摘要: $ra=get_headers('http://hi.baidu.com'); if($ra[0]==='HTTP/1.1 200 OK'){ echo 'ok'; }这是错误的,因为有时会返回HTTP/1.0 200 OK 解决办法是获取最后的两位字符串if(substr($headers[0],-2)==='OK'){ echo ‘ok’;}else{ echo 'no';} 阅读全文

posted @ 2013-12-31 20:59 左小兵 阅读(292) 评论(0) 推荐(0) 编辑

上一页 1 ··· 12 13 14 15 16

导航