热门关键字:
javascript获取网页位置属性详解

网页可见区域宽:document.body.clientWidth网页可见区域高:document.body.clientHeight网页可见区域宽:document.body.offsetWidth(包括边线的宽)网页可见区域高:document.body.offsetHeight(包括边线的宽)网页正文全文宽:document.body.scrollWidth网页正文全文高:documen...

1219
2015/1/22 14:11:27
0
View Details
网友czqn8分享javascript实现倒计时特效

window.onload=function(){functionlimit(){varendtime=newDate('2015/02/14,00:00:00'),nowtime=newDate(),theEnd=parseInt((endtime.getTime()-nowtime.getTime())/1000),t=document.getEleme...

1749
2014/12/16 22:12:58
0
View Details
javascript修改Cookie的属性expires

functionsetCookieExpires(CookieName,expires){varexp='';if(expires==''){exp='';//expires不设置,浏览器关闭时过期}else{exp=newDate();exp.setTime(exp.getTime()+expires);//增加日期exp=";expi...

2702
2014/12/8 17:42:34
0
View Details
获取客户端浏览器、系统、和驱动类型的javascript脚本

(function(){varbrowser='other',system='other',device='PC';varpf=navigator.platform,ua=navigator.userAgent,href=window.location.href;//埋点地址varroot='';//开关varON=false;//window系统匹...

1324
2014/12/8 17:38:21
0
View Details
javascript监听关闭浏览器页面的操作事件

window.onbeforeunload=function(){if(document.all){if(event.clientY<0){return"确定要离开吗?";}}else{return"确定要离开吗?";}}

6986
2014/11/25 10:14:20
0
View Details
javascript判断IE浏览器和获取IE版本号

functionisIE(){if(!!window.ActiveXObject||"ActiveXObject"inwindow){returntrue;}else{returnfalse;}}functionIEVersion(){varrv=-1;if(navigator.appName=='MicrosoftInternetExplorer'){varua...

4327
2014/11/5 9:31:26
0
View Details
javascript自动识别是否移动设备访问

functionis_pc(){varos=newArray("Android","iPhone","WindowsPhone","iPod","BlackBerry","MeeGo","SymbianOS");//其他类型的移动操作系统类型,自行添加varinfo=navigator.userAgent;varlen=os.length;for(vari=0...

3306
2014/11/4 17:04:11
0
View Details
javascript扩展Date的format方法

//扩展Date的format方法Date.prototype.format=function(format){varo={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds()...

4265
2014/11/3 18:42:34
0
View Details
javascript中undefined与null的区别

微信号:js_gcs大多数计算机语言,都有一个表示"无"的值,比如,C语言的NULL,Java语言的null,Python语言的none,Ruby语言的nil。有点奇怪的是,JavaScript语言居然有两个表示"无"的值:undefined和null。这是为什么?一、相似性在JavaScript中,将一个变量赋值为undefined或null,老实说,几乎没区别。vara=undefine...

1757
2014/10/22 13:42:41
0
View Details
javascript检测客户端是否安装了MSN,Skype,qq软件

javascript检测客户端是否安装了MSN,Skype,qq软件的通用方法代码如下:functioncheckInstalled(m){switch(m){case'msn':try{newActiveXObject("MSNMessenger.P4QuickLaunch");returntrue;}catch(e){returnfalse;}case'skype':tr...

2558
2014/6/4 9:24:31
0
View Details