百度首页 | 百度空间
 
查看文章
 
下午公司断网了,blog现在补上
2007年05月09日 星期三 下午 08:26

最先说的是上午看见为了完成一个目标,3种不同的实现
第一种
$class = "even";
foreach ($table as $row) {
    $class = ($class=='even') ? 'odd' : 'even';

    print "<tr class='$class'>
    // the rest of your row output
    print "</tr>";
}
不错
方法二
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
if ($row % 2) { $data_string .= '<tr class="hi_lite"> ';
}
else    { $data_string .= '<tr> ';

--     add the rest of the stuff to the data string and then print it

}
很好
方法三
$class = FALSE;
foreach ($table as $row) {
    print "<tr class='" . ($class ? "even" : "odd") . "'>";
    // the rest of your row output
    print "</tr>";
    $class = !($class);
}
我靠,太牛了,这就是大牛所谓的利用true/false写判断呀,太牛了
下午调了一巨bt的代码,哪个页面混乱使用iframe,代码中胡乱引用,大量window.top操作,整个过程异常混乱,不兼容ff,没有firebug可以调试,总之就是郁闷,在使用textarea和eval之后,测试了大量代码之后,明白了之间关系,搞定,这么多人不懂web呀,不懂web的人写出来的东西那真是相当相当的bt,bt太bt了
正在读一本css2的书,不错,css2的selector好强大呀,当然比jQuery和Prototype的selector就差远了,估计以后会大量使用jQuery,可能Prototype以后要冷落了,scriptaculous现在才知道我还不是很了解,我对于effect可能还是比较入门呀


类别:工作 | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码:
 

     

©2008 Baidu