手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >修改js Calendar日历控件 兼容IE9/谷歌/火狐
修改js Calendar日历控件 兼容IE9/谷歌/火狐
摘要:修改Calendar日历控件兼容IE9,谷歌,火狐。只是能用,出现的位置有所不同,希望有高手再帮我改改吧,谢谢一、复制代码代码如下:this...

修改Calendar日历控件 兼容IE9,谷歌,火狐。

只是能用,出现的位置有所不同,希望有高手再帮我改改吧,谢谢

一、

复制代码 代码如下:

this.iframe = window.frames("meizzCalendarIframe");

修改为

复制代码 代码如下:

this.iframe = window.frames["meizzCalendarIframe"];

二、

复制代码 代码如下:

var a = (arguments.length==0) ? WebCalendar.day[this.id.substr(8)].split("/") : arguments[0].split("/");

修改为

复制代码 代码如下:

var a = WebCalendar.day[this.id.substr(8)].split("/");

三、

复制代码 代码如下:

function dayMouseOver()

{

this.className = "over";

this.style.backgroundColor = WebCalendar.darkColor;

if(WebCalendar.day[this.id.substr(8)].split("/")[1] == WebCalendar.thisMonth)

this.style.color = WebCalendar.lightColor;

}

function dayMouseOut()

{

this.className = "out"; var d = WebCalendar.day[this.id.substr(8)], a = d.split("/");

this.style.removeattribute("backgroundColor");

if(a[1] == WebCalendar.thisMonth && d != WebCalendar.today)

{

if(WebCalendar.dateStyle && a[0] == parseInt(WebCalendar.dateStyle[4], 10))

this.style.color = WebCalendar.lightColor;

this.style.color = WebCalendar.wordColor;

}

}

修改为

复制代码 代码如下:

var bgbgbg;

function dayMouseOver()

{

this.className = "over";

bgbgbg=this.style.backgroundColor;

this.style.backgroundColor = WebCalendar.darkColor;

if(WebCalendar.day[this.id.substr(8)].split("/")[1] == WebCalendar.thisMonth)

this.style.color = WebCalendar.lightColor;

}

function dayMouseOut()

{

this.className = "out"; var d = WebCalendar.day[this.id.substr(8)], a = d.split("/");

this.style.backgroundColor = bgbgbg;

if(a[1] == WebCalendar.thisMonth && d != WebCalendar.today)

{

if(WebCalendar.dateStyle && a[0] == parseInt(WebCalendar.dateStyle[4], 10))

this.style.color = WebCalendar.lightColor;

this.style.color = WebCalendar.wordColor;

}

}

【修改js Calendar日历控件 兼容IE9/谷歌/火狐】相关文章:

Javascript 不能释放内存.

些很实用且必用的小脚本代码

js实现异步循环实现代码

根据分辨率不同,调用不同的css文件

js+html5实现canvas绘制简单矩形的方法

在JavaScript中处理时间之setMinutes()方法的使用

jQuery实现控制文字内容溢出用省略号(…)表示的方法

jQuery实现限制textarea文本框输入字符数量的方法

详解JavaScript中的表单验证

JS实现兼容各浏览器解析XML文档数据的方法

精品推荐
分类导航