为你而来

上一页 1 ··· 4 5 6 7 8 9 10 下一页

2012年3月16日

php复习:文件目录操作函数

摘要: basename('c:/Appserv/www/myphp/6-9.php', '.php');//加.php ,返回6-9dirname('c:/Appserv/www/myphp/6-9.php');//返回:c:/Appserv/www/myphpfileatime()//文件访问时间filemtime()//文件修改时间is_writable()//文件是否可写filetype('c:/Appserv/www/myphp')//一般为dir或file 阅读全文

posted @ 2012-03-16 20:21 为你而来 阅读(99) 评论(0) 推荐(0) 编辑

2012年3月15日

php复习:字符串函数

摘要: $str = "first=value&arr[]=foo+bar&arr[]=baz";parse_str($str);//解析urlecho $first;// valueecho $arr[0]; // foo barecho $arr[1]; // bazhtmlspecialchars();strip_tags($str,'<p><a>');//删除除p,a标记的其他html标记$str=str_replace($search,$replacement,$str,[&$i]);//$i,用来存储另一返 阅读全文

posted @ 2012-03-15 17:31 为你而来 阅读(119) 评论(0) 推荐(0) 编辑

2012年3月14日

php复习:数组函数

摘要: $arr=array('jim','tom','mary','jack','lucy');next($arr);prev();reset();current();unset($arr[0]);list($x,$y,$z)=$arr;asort($arr);//由小到大排序while($sz=each($arr)){ echo "$sz[value]<br/>";}$arr=array('a'=>'jim','b'=>' 阅读全文

posted @ 2012-03-14 21:04 为你而来 阅读(180) 评论(0) 推荐(0) 编辑

2012年3月13日

php复习:mysql函数

摘要: mysql_num_rows()mysql_num_fields($res)//查找当前结果集的字段数mysql_fetch_object($res)//返回的结果是对象,$obj->name$obj=mysql_fetch_field($res,0);//取得第一列的信息//如$obj->type:字段类型;$obj->primary_key:该列是否为主键,是为1否为0mysql_query($sql);mysql_db_query($dbname,$sql);mysql_result($res,$row_index,[$field_index/$field_name]) 阅读全文

posted @ 2012-03-13 21:08 为你而来 阅读(115) 评论(0) 推荐(0) 编辑

2012年3月12日

javascript:函数之arguments对象

摘要: function fun(a,b){ arguments.length//传递的参数个数 fun.length//定义的参数个数,本例为2 arguments[i]//取得参数的值 arguments.callee(a,b); //即相当于fun(a,b); } 阅读全文

posted @ 2012-03-12 10:51 为你而来 阅读(99) 评论(0) 推荐(0) 编辑

2012年3月11日

javascript: 面向对象基础知识

摘要: funtiont person(){ this.name=''; this.sex=''; this.run=_run; function _run() { }}p=new person();for(x in p){ //x为属性或方法名; //用p[x]获取属性的值 //或者eval("p."+x)亦可 typeof mobile[x] == "function"}p.weight=45;//这样即增加了weight属性delete p.name;//这样便删除了name属性 阅读全文

posted @ 2012-03-11 20:18 为你而来 阅读(118) 评论(0) 推荐(0) 编辑

javascript:字符串对象

摘要: str=new String('这是一个字符串对象');str=string(23);str.replace(search,replace);str.indexOf();str.lastIndexOf();str.charAt(0);str.substring(index1,index2);//从index1到index2前的字符串str.substr(start,length);//start为负数,在ie浏览器中是不起作用的str.slice(index1,index2);str='hello'str.slice(-3,4)//从倒数第三个 到正数(下标从0 阅读全文

posted @ 2012-03-11 03:20 为你而来 阅读(138) 评论(0) 推荐(0) 编辑

2012年3月8日

javascript:数组

摘要: arr=new Array();arr.toString();arr.join('-');(str='1,2,3';arr=str.split(',','2');)通过改变数组的length值来删除数组arr.length=2;var arr=new Array(1,2,3,4);arr.splice(1,2)//1,4;参数1下标,参数2长度;指定的部分将被删除arr.splice(1,2,arg1,arg2....)//将指定删除的部分用arg1,arg2替换arr.slice(index1,index2)//index1到i 阅读全文

posted @ 2012-03-08 20:53 为你而来 阅读(117) 评论(0) 推荐(0) 编辑

javascript:函数知识

摘要: obj=function(){}obj=new Function(,,);几个常用的数值转换函数:String()Number()Boolean()parseInt()parseFloat() 阅读全文

posted @ 2012-03-08 19:52 为你而来 阅读(74) 评论(0) 推荐(0) 编辑

2012年3月7日

表单对象

摘要: document.forms[i].elements[j]obj=document.getElementById('input');obj.defaultValueobj.disabledobj.select();//this.select();选择文本obj2=document.getElementById('select');obj2.options[obj2.options.length]=new Option('text','value');obj2.remove(index);//index是数字obj2.selecte 阅读全文

posted @ 2012-03-07 12:54 为你而来 阅读(125) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 下一页

导航