易截截图软件、单文件、免安装、纯绿色、仅160KB

javascript 转换为UNIX时间戳,PHP可用

//转换为UNIX时间戳
function strtotimestamp(datestr)
{
    var new_str = datestr.replace(/:/g,"-");
    new_str = new_str.replace(/ /g,"-");
    var arr = new_str.split("-");
    var datum = new Date(Date.UTC(arr[0],arr[1]-1,arr[2],arr[3]-8,arr[4],arr[5]));
    return (datum.getTime()/1000);  //为PHP所用
    }
//UNIX时间戳转换为字符串
function timestamptostr(timestamp) {
     d = new Date(timestamp.getTime());
     var jstimestamp = (d.getFullYear())+"-"+(d.getMonth()+1)+"-"+(d.getDate())+" "+(d.getHours())+":"+(d.getMinutes())+":"+(d.getSeconds());
     return jstimestamp;
    }
javascript timestamp 和PHP 时间戳 差 8个小时
strtotimestamp("2010-01-01  08:00:00");          //PHP输出 2010-01-01  00:00:00
 strtotimestamp("2010-01-11  23:59:59")+(8*60*60);  //PHP输出 2010-01-11  23:59:59


相关文档:

JavaScript 获取对象的高度和宽度详细说明

scrollHeight: 获取对象的滚动高度。
scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离
scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离
scrollWidth:获取对象的滚动宽度
offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度
offsetL ......

PHP 一些知识

1.取得当前内存使用大小:memory_get_usage()
2.计算执行时间:microtime(true)
3.设置script执行时间限制set_time_limit
4.设置内存限制ini_set("memory_limit","256M");
3.从远程下载文件的两个方法:
$contents=file_get_contents("http://www.govtrack.us/data/us/gis/zip4dist-prefix.t ......

marquee滚动标签的javascript(jquery)替代品

marquee滚动标签的javascript(jquery)替代品:jquery.marquee插件(http://remysharp.com/tag/marquee)   <!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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号