修改js Calendar日历控件 兼容IE9/谷歌/火狐
更新时间:2013年01月04日 17:26:43 作者:
修改js Calendar日历控件 兼容IE9/谷歌/火狐等主流浏览器,只是能用,出现的位置存在一些差异,晒出来与大家分享,希望有高手再帮我改改吧
修改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;
}
}
只是能用,出现的位置有所不同,希望有高手再帮我改改吧,谢谢
一、
复制代码 代码如下:
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;
}
}
相关文章
JavaScript+HTML5 canvas实现放大镜效果完整示例
这篇文章主要介绍了JavaScript+HTML5 canvas实现放大镜效果,结合完整实例形式分析了javascript+HTML5 canvas针对图片元素的获取、响应鼠标事件变换元素属性相关操作技巧,需要的朋友可以参考下2019-05-05
最新评论