摘要: 环境: 1.jQuery v2.1.1 2.ThinkPHP 3.2.3 HTML页面: <button type="button" id="cat" onclick="return showList()" class="btn btn-primary pull-right">删除</button> 阅读全文
posted @ 2017-01-03 23:49 cat_crazy 阅读(3517) 评论(0) 推荐(0) 编辑
摘要: class Cat{ public $name; protected $age; private $skill; public function __construct($name, $age, $skill){ $this->name = $name; $this->age = $age; $th 阅读全文
posted @ 2017-01-03 19:11 cat_crazy 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 方法一:自定义函数 /** * [object_to_array 对象转换为数组] * @author cat_crazy 2017-01-03 * @param [object] $object [description] * @return [array] [description] */fun 阅读全文
posted @ 2017-01-03 18:42 cat_crazy 阅读(120) 评论(0) 推荐(0) 编辑
摘要: /** * 开灯问题 * 有n盏灯 编号1~n 第一个人把所有灯点亮,第2个人按下所有编号为2的倍数的灯开关, * 第3人按编号为3的灯(其中关的灯被打开 开的灯被熄灭),求最后有多少灯开着? */ function light($light){ $num = 0; for($i = 1; $i < 阅读全文
posted @ 2017-01-03 18:28 cat_crazy 阅读(88) 评论(0) 推荐(0) 编辑