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

JavaScript特效:页面停留时间

<script language="javascript" type="text/javascript">
var TempTime=new Date().getTime();
function StayTime(){
    var NowTime=new Date().getTime();
    var Time=NowTime-TempTime;
    var Days=Math.floor(Time/(24*60*60*1000));
    Time-=Days*24*60*60*1000;
    var Hours=Math.floor(Time/(60*60*1000));
    Time-=Hours*60*60*1000;
    var Minutes=Math.floor(Time/(60*1000));
    Time-=Minutes*60*1000;
    var Seconds=Math.floor(Time/1000);
    alert("您在本页面停留了:"+String(Days)+"天"+String(Hours)+"时"+String(Minutes)+"分"+String(Seconds)+"秒");
}
</script>
<body onunload="StayTime();">
实例演示:http://www.fengyekun.com/Study_711.html


相关文档:

Javascript 中 String.replace( ) 的妙用

<script language="javascript">
<!--
String.prototype.replaceAll = stringReplaceAll;
function stringReplaceAll(AFindText,ARepText){
raRegExp = new RegExp(AFindText,"g");
return this.replace(raRegExp,ARepText)
}
var content = "%sfasf%sfd%asdfsadf%1111%"
 // 把 所有的 % 替换为 #
......

asp.net 在前台和后台调用 javascript 函数

1、直接在前台调用 javascript 函数
很简单,在 head 元素之间加入 script 元素,将 type 元素设置为 " text/javascript "
如:
<head runat="server">
<mce:script type="text/javascript" ><!--
function ShowName(str)
{
alert("您的名字为:("+str+")");
}
// --></mce:script>
< ......

javascript common

1.document.write( " "); 输出语句
2.JS中的注释为//
3.传统的HTML文档顺序是:document- >html- >(head,body)
4.一个浏览器窗口中的DOM顺序是:window- >(navigator,screen,history,location,document)
5.得到表单中元素的名称和值:document.getElementById( "表单中元素的ID號 ").name(或value)
6 ......

javascript继承

用call方法实现继承
function classA(sColor){ 
       this.color=sColor; 
       this.sayColor=function(){ 
         alert(this.color); 
       ......

JavaScript特效:图片鼠标滚轮缩放

<!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>
<title>图片鼠标滚轮缩放</title>
<meta http-eq ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号