Modify the Calendar calendar control to be compatible with IE9, Google, and Firefox.
It just works, but the position is different. I hope someone can help me change it. Thank you
1.
this.iframe = window.frames("meizzCalendarIframe");
is modified to
this.iframe = window.frames["meizzCalendarIframe"];
2.
var a = (arguments.length= =0) ? WebCalendar.day[this.id.substr(8)].split("/") : arguments[0].split("/");
is changed to
var a = WebCalendar.day[this.id.substr(8 )].split("/");
3.
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;
}
}
modified to
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;
}
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn