分页: 2/31 第一页 上页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 下页 最后页 [ 显示模式: 摘要 | 列表 ]

Three-pixel text jog

[不指定 2008/09/26 08:08 | by Else ]
This issue was originally documented by Holly Bergevin and Big John Gallant on positioniseverything.net.

http://www.positioniseverything.net/explorer/threepxtest.html
Fixing this 3-pixel text jog that's introduced when line boxes with inline elements are adjacent to a float in IE/Windows requires giving the paragraph an explicit dimension, which prevents IE/win from adding the 3px space. However, adding a dimension (width or height) also throws IE into a proprietary float model- and the element will act much like a float, displaying next to the real floated element, as opposed to letting the float overlap it.


The old (pre-IE7) solution for this bug, and several others, was the Holly Hack. However, the Holly Hack relies on buggy behavior that is no longer present in Internet Explorer 7 -- and using it can cause things to go a bit haywire. Instead, use an Internet Explorer Conditional Comment (IECC) to apply zoom: 1 to the line box in all versions of Internet Explorer. This will give the box the "layout" it needs to prevent the three-pixel gap, without throwing Internet Explorer into its proprietary float model.


<!--[if IE]><style type="text/css"> .mybuggyelement { zoom: 1;}</style><![endif]-->
Tags: ,

//连接数据库
  //link database
  
  function DBLink($dbhost='localhost', $dbuser='root', $password='', $dbname='', $pconnect=0){
    $this->LinkID[$this->Line] = ($pconnect == 1)? @mysql_pconnect($dbhost, $dbuser, $password,0,131072) : @mysql_connect($dbhost, $dbuser, $password,0,131072) or die("Connect to MySQL ($dbhost,$dbuser) failed");
    //选择连接数据库
    //choose to link database
    @mysql_select_db($dbname, $this->LinkID[$this->Line]) or die('Cannot use database '.$dbname);
    return $this->LinkID[$this->Line];
  }


这个是执行的效果,还不错,性能还没有测试!放弃php4 和mysql4
$aaa=$ck->et_list("call news()");
  print_r($aaa);

css div上的一些排法,

[不指定 2008/09/16 15:00 | by Else ]

<div style="border: solid 1px red; ">
<div style="height:400px; float:left; width:0px;"></div>
  <div style="margin-left:200px;">
      <p>asdfsafdsadf
      asdf</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>asf</p>
      <p>d</p>
      <p>sad</p>
      <p>f</p>
      <p>sad</p>
      <p>f</p>
      <p>sadf</p>
      <p>sa</p>
      <p>df</p>
      <p>sad</p>
      <p>f</p>
      <p>asdf</p>
      <p>asdf</p>
  </div>
    <div style="clear:both; height:0px;"></div>
</div>


这个是给有要固定一下高度的页面用的

jquery load取的目标页的dom

[不指定 2008/09/11 11:21 | by Else ]
先建两个文件做测试
被加载的页jt1.html
执行页jt2.html
jquery版本:1.2.6

jt2.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="js/jquery.js" type="text/javascript"></script>
<script>
$(document).ready(function(){  
      $("div").load("jt1.html #tb1");
});
</script>
</head>

<body>
<div></div>
<span></span>
</body>
</html>

Tags: , ,
<% Response.ContentType = "application/vnd.ms-excel" %>
<table width="164" height="61" border="1">
  <tr>
    <td align="center">編號</td>
    <td align="center">姓名</td>
</tr>
  <tr>
    <td align="center">6</td>
    <td align="center">Else</td>
</tr>
</table>

看asp代碼的部分是不是很簡單?
相對而言 php的導成excel的代碼
Tags: , ,
引用地址:http://datum.studyget.com/sh/200806/20080623_61247.shtml

在CSS网页布局中,常常会遇到这样的问题,强制文字换行,而不是在一行内显示撑开容器影响布局。而有些时候可能会强制内容不换行,多出的部分隐藏掉即可,关于强制不换行与强制换行的一些CSS属性WEBJX.com作一些整理,希望能给大家的工作和学习提供参考。
  先了解以下几个属性:



强制不换行
p.www_webjx_com {
  white-space:nowrap;
  }
自动换行
p.www_webjx_com {
  word-wrap: break-word;
  word-break: normal;
  }
强制英文单词断行
p.www_webjx_com {
  word-break:break-all;
  }

php列出目录中的所有文件

[不指定 2008/09/07 08:35 | by Else ]
范例
例子 1. 列出目录中的所有文件

请留意下面例子中检查 readdir() 返回值的风格。这里明确地测试返回值是否全等于(值和类型都相同――更多信息参见比较运算符)FALSE,否则任何目录项的名称求值为 FALSE 的都会导致循环停止(例如一个目录名为“0”)。


<?php
// 注意在 4.0.0-RC2 之前不存在 !== 运算符

if ($handle = opendir('/path/to/files')) {
    echo "Directory handle: $handle\n";
    echo "Files:\n";

    /* 这是正确地遍历目录方法 */
    while (false !== ($file = readdir($handle))) {
        echo "$file\n";
    }

    /* 这是错误地遍历目录的方法 */
    while ($file = readdir($handle)) {
        echo "$file\n";
    }

    closedir($handle);
}
?>  




例子 2. 列出当前目录的所有文件并去掉 . 和 ..


<?php
if ($handle = opendir('.')) {
    while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != "..") {
            echo "$file\n";
        }
    }
    closedir($handle);
}
?>  



Tags: ,

jquery加载当前页

[不指定 2008/09/06 23:28 | by Else ]
$("#catlist").load(window.location.href);

主要是上面的一行加载曾经建议csdn把评论改成上面的加载方式,不过没有成功,他们都回到第一页
$.ajax({
        beforeSend:function(){$("#catlist").append("<div id='myloadinfo' style='position:absolute;left:360px;top:300px;width:200px;height:30px;z-index:3;text-align:center;line-height:20px;background-color: #FFFFFF;'><br><img src='img/loading.gif'/><br>正在载入中...</div>").show("slow");},
        type: "post",
        url:"adminajax.php?act="+dbgo,
        data:$("input").serialize(),
        success: function(comm){
          $("#msg").html(comm);
          $("#catlist").load(window.location.href);
        },
        error:function(){
        $("#msg").html("链接出错");
      }
Tags: ,
其實這樣的例子很多,在dw cs3裡就就有很多我也是看那例子的
顯示地址
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style type="text/css">
* {
margin:0;
padding:0;
}

body {
height:100%;
}
.top {
  height: 100px;
  background-color:#FFC
}
.left {
  height: 600px;
  width: 150px;
  float: left;
  background-color:#CCCccc;
  
}
.main {
  height: 600px;
  margin-left: 160px;
  background-color:#F2F2F2;
}
.bottom {
  height: 100px;
  /*clear: both;可以不用吧*/
  background-color:#FFC
}
body {
  margin: 0px;
}
div {
  border: 1px solid #C0C0C0;
}
</style>
</head>

<body>

<div class="top">
</div>
<div>
<div class="left">
</div>
<div class="main">aaa
</div>
</div>
<div class="bottom">
</div>
</body>
</html>
Tags: , ,

还是mysql的问题

[不指定 2008/08/30 22:32 | by Else ]
今天想把mysql时间段的日期弄出来,
没有找到相关的函数,于是只好用下面这招


right(left(time,10),5) as `time`


我的cuku.net的新版面出来了!

现在这个是群里朋友给的答案
DATE_FORMAT(time, '%m-%d')
Tags:
分页: 2/31 第一页 上页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 下页 最后页 [ 显示模式: 摘要 | 列表 ]