<?php class Ajax{ //ajax调用的方法 //sql是要执行的语句 //$type是SQL语句的类型,0代表增删改,1代表查询 //$db代表要操作的数据 public function Ajax($sql,$type=1,$db="lian1") { //造连接对象 $conn = new mysqli($this->host,$this->uid,$this->pwd,$db); //判断连接是否成功 !mysqli_connect_err
js代码: window.onload = function(){ var mian = document.getElementById( "mian" ); var mian1 = document.getElementById( "mian1" ); var str = mian.innerHTML; var arry = []; var len = str.length; for( var i = 0; i < len; i++ ){ arry[ i ]