修改js Calendar日歷控件 兼容IE9/谷歌/火狐
更新時間:2013年01月04日 17:26:43 作者:
修改js Calendar日歷控件 兼容IE9/谷歌/火狐等主流瀏覽器,只是能用,出現(xiàn)的位置存在一些差異,曬出來與大家分享,希望有高手再幫我改改吧
修改Calendar日歷控件 兼容IE9,谷歌,火狐。
只是能用,出現(xiàn)的位置有所不同,希望有高手再幫我改改吧,謝謝
一、
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;
}
}
只是能用,出現(xiàn)的位置有所不同,希望有高手再幫我改改吧,謝謝
一、
復(fù)制代碼 代碼如下:
this.iframe = window.frames("meizzCalendarIframe");
修改為
復(fù)制代碼 代碼如下:
this.iframe = window.frames["meizzCalendarIframe"];
二、
復(fù)制代碼 代碼如下:
var a = (arguments.length==0) ? WebCalendar.day[this.id.substr(8)].split("/") : arguments[0].split("/");
修改為
復(fù)制代碼 代碼如下:
var a = WebCalendar.day[this.id.substr(8)].split("/");
三、
復(fù)制代碼 代碼如下:
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;
}
}
修改為
復(fù)制代碼 代碼如下:
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;
}
}
相關(guān)文章
JavaScript高級編程之Array的用法總結(jié)
這篇文章主要為大家介紹了JavaScript中Array常見用法的總結(jié),具有一定的參考價值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來幫助2022-11-11
Bootstrap教程JS插件彈出框?qū)W習(xí)筆記分享
這篇文章主要為大家分享了Bootstrap教程JS插件彈出框?qū)W習(xí)筆記,為大家詳細(xì)介紹Bootstrap彈出框的使用方法,感興趣的小伙伴們可以參考一下2016-05-05
ES6 Class中實(shí)現(xiàn)私有屬性的一些方法總結(jié)
這篇文章主要給大家介紹了關(guān)于ES6 Class中實(shí)現(xiàn)私有屬性的一些方法,文中通過示例代碼介紹的非常詳細(xì),對大家學(xué)習(xí)或者使用ES6具有一定的參考學(xué)習(xí)價值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧2019-07-07
countUp.js實(shí)現(xiàn)數(shù)字滾動效果
這篇文章主要為大家詳細(xì)介紹了countUp.js實(shí)現(xiàn)數(shù)字滾動效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下2019-10-10
javascript ie6兼容position:fixed實(shí)現(xiàn)思路
positon:fixed 讓HTML元素脫離文檔流固定在瀏覽器的某個位置,由于網(wǎng)頁中類似這樣的元素很多,所以本文的出現(xiàn)是很有必要的了,接下為大家介紹下javascript如何實(shí)現(xiàn)ie6下的position:fixed2013-04-04
10行原生JS實(shí)現(xiàn)文字無縫滾動(超簡單)
下面小編就為大家分享一篇10行原生JS實(shí)現(xiàn)文字無縫滾動的效果,特別簡單,具有很好的參考價值,希望對大家有所幫助2018-01-01
javascript使用canvas實(shí)現(xiàn)餅狀圖效果
這篇文章主要為大家詳細(xì)介紹了javascript使用canvas實(shí)現(xiàn)餅狀圖效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下2020-09-09
JS實(shí)現(xiàn)面包屑導(dǎo)航功能從零開始示例
這篇文章主要為大家介紹了JS實(shí)現(xiàn)面包屑導(dǎo)航功能從零開始示例,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-12-12
JS實(shí)現(xiàn)仿中關(guān)村論壇評分后彈出提示效果的方法
這篇文章主要介紹了JS實(shí)現(xiàn)仿中關(guān)村論壇評分后彈出提示效果的方法,實(shí)例分析了javascript彈出特效的css與提示框的具體實(shí)現(xiàn)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-02-02

