<div class="alert_fullbg"></div>样式:html,htmlbody { _background:url(/css/about:blank) #F4F5EF; _background-attachment:fixed}body { height:100%}.alert_fullbg {height:100%; width:100%; top:0; left:0; position:fixed; _position:absolute; z-index:100000; filter:alpha(opacity=... Read More
posted @ 2013-01-24 17:29 tinyphp Views(165) Comments(0) Diggs(0) Edit
如:echo $product;结果为:{"brand":"佳能","category":"单反相机"}json_decode解析:$web=json_decode($product);这时候你print_r($web);可以看到:$web是一个对象stdClass Object([brand] => 佳能[category] => 单反相机}想拿里面的值echo $web->brand; //得到佳能 Read More
posted @ 2013-01-22 15:07 tinyphp Views(26482) Comments(0) Diggs(0) Edit
一起发:http://open.yiqifa.com/豆瓣开放平台:http://developers.douban.com/腾讯微博开放平台:http://dev.t.qq.com/ Read More
posted @ 2013-01-21 15:00 tinyphp Views(417) Comments(0) Diggs(0) Edit
在ie中,有些标签的innerHTML属性是只读的,如下:COL, COLGROUP, FRAMESET,html, STYLE, TABLE, TBODY, TFOOT, THEAD, TITLE, TR Read More
posted @ 2013-01-18 12:06 tinyphp Views(404) Comments(0) Diggs(0) Edit
<?php$s = 'http://item.taobao.com/item.htm?id=16866631720&ali_trackid=2:mm_1463_0_0:1357875437_410_201055913&spm=2014.1';parse_str(substr($s, strpos($s, '?')+1), $ar);print_r($ar);?>将得到:Array([id]=>16866631720[ali_trackid]=>2:mm_1463_0_0:1357875437_410_201055913[s Read More
posted @ 2013-01-18 10:50 tinyphp Views(1925) Comments(0) Diggs(0) Edit
今天遇到一个问题,就是动态添加option到slect里面在ie6不成功:<script>var shosetype=document.createElement("select"); shosetype.setAttribute("id","sc");document.body.appendChild(shosetype);var option="<option value=\"1\">添加成功</option>";shosetype.innerHTML=o Read More
posted @ 2013-01-17 18:27 tinyphp Views(48123) Comments(0) Diggs(1) Edit
想循环的时候累加字符串,然后这样写,是没有效果的<script>function dd(){for(var i=0; i<2;i++){var op+="sdfsd";}alert(op);}dd();</script>因为声明的时候是不能累加的,var x+=...这样的写法本身就是错误,这样就可以了<script>function dd(){var op="";for(var i=0; i<2;i++){op+="sdfsd";}alert(op);}dd();</script Read More
posted @ 2013-01-17 16:46 tinyphp Views(23754) Comments(2) Diggs(2) Edit
<script>function fun1(){var str = '[{"uname":"王宝强","day":"2012/06/17"},{"uname":"李连杰","day":"2012/08/12"}]'; var jsonList=eval("("+str+")"); //转换为json对象for(var i=0;i<jsonList.length;i Read More
posted @ 2013-01-16 18:02 tinyphp Views(12289) Comments(0) Diggs(0) Edit
$arrprint_r之后是这样的:array('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5); 怎么把它print_r之后的东西保存下来呢??变成$a="array('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);"解决方法:var_export()会一直保留着结构化形式存储数据.$a=var_export( Read More
posted @ 2013-01-16 17:03 tinyphp Views(385) Comments(0) Diggs(0) Edit
有没试过插入的数据无论是多少,都是会变成“2147483647”,因为你的值已经超过最大限度啦!int最大范围2147483647,换varchar吧!或者bigint Read More
posted @ 2013-01-14 10:52 tinyphp Views(727) Comments(0) Diggs(0) Edit