上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
  2016年6月22日
摘要: 鼠标事件是在用户移动鼠标光标或者使用任意鼠标键点击时触发的。 (1):click事件:click事件于用户在元素敲击鼠标左键,并在相同元素上松开左键时触发。 $('p').click(function(){ alert('click function is running !'); }); (2): 阅读全文
posted @ 2016-06-22 21:44 By_The_Way 阅读(8046) 评论(0) 推荐(0)
  2016年6月20日
摘要: <body> <div id="one"><span>one</span></div><div class="test" bs="aa">two</div><div class="test">three</div><div class="test">four</div><input type="te 阅读全文
posted @ 2016-06-20 21:56 By_The_Way 阅读(140) 评论(0) 推荐(0)
摘要: <?php //PDO:数据访问抽象层//dsn:数据源://带有事务功能:$dsn = "mysql:host=localhost;dbname=mydb"; ——建立数据源//造pdo对象$pdo = new PDO($dsn,"root","123");//设置为异常模式$pdo->setAt 阅读全文
posted @ 2016-06-20 21:41 By_The_Way 阅读(179) 评论(0) 推荐(0)
摘要: <?php /** file: page.class.php 完美分页类 Page */ class Page { private $total; //数据表中总记录数 private $listRows; //每页显示行数 private $limit; //SQL语句使用limit从句,限制获取 阅读全文
posted @ 2016-06-20 21:30 By_The_Way 阅读(4532) 评论(1) 推荐(0)
摘要: <!--条件处理部分--><?php//引用两个封装好的类文件include("REN.class.php");include("Page.class.php");$a=new REN();//定义一个变量作为条件变量,设置其初始值为恒成立,即在没有输入值的情况下,显示的是所有内容$tj=" 1=1 阅读全文
posted @ 2016-06-20 21:28 By_The_Way 阅读(148) 评论(0) 推荐(0)
  2016年6月17日
摘要: 例一: <?php$input = array("a" => "green","", "red","b" => "green", "","blue", "red","c" => "witer","hello","witer");//$result = array_unique($input); // 阅读全文
posted @ 2016-06-17 21:42 By_The_Way 阅读(21990) 评论(0) 推荐(1)
  2016年6月13日
摘要: 面向对象的方式访问数据库 1.造对象 $db=new MySQLi("localhost","root","123","hr"); 2.判断连接是否出错 !mysqli_connect_error() or die("连接失败!"); 3.写SQL语句 $sql="inselt into info 阅读全文
posted @ 2016-06-13 21:22 By_The_Way 阅读(378) 评论(1) 推荐(0)
  2016年6月7日
摘要: 1、克隆关键词:clone class Ren{ public $name; public $sex; function __construct($n,$s) //构造方法,设置初始值 { $this->name=$n; $this->sex = $s; } function __clone() / 阅读全文
posted @ 2016-06-07 21:18 By_The_Way 阅读(177) 评论(0) 推荐(0)
摘要: 1、抽象类:不能实例化,但是能被继承;关键词:abstract abstract class Zhiwu{ public $budong; public $gen; function Guanghezuoyong() { } function Huafenchuanbo() { } } 2、接口接口 阅读全文
posted @ 2016-06-07 20:59 By_The_Way 阅读(134) 评论(0) 推荐(0)
  2016年6月6日
摘要: class FenBi{ public $length; //属于对象的 public static $color='red'; //属于类的,静态,static静态关键词 //返回数据库的连接对象 public static function LianJie() { FenBi::$color; 阅读全文
posted @ 2016-06-06 21:40 By_The_Way 阅读(119) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页