DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> JavaScript入門知識 >> 關於JavaScript >> 修改js Calendar日歷控件 兼容IE9/谷歌/火狐
修改js Calendar日歷控件 兼容IE9/谷歌/火狐
編輯:關於JavaScript     
修改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;
}
}
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved