首頁 > web前端 > js教程 > 主體

修改js Calendar日曆控制 相容IE9/Google/火狐_javascript技巧

WBOY
發布: 2016-05-16 17:44:28
原創
1348 人瀏覽過

修改Calendar日曆控制 相容IE9,谷歌,火狐。
只是能用,出現的位置有所不同,希望有高手再幫我改改吧,謝謝
一、

複製程式碼 程式碼如下:

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

修改為
修改為
修改為 >複製程式碼
程式碼如下:

this.iframe = window.frames["meizzCalendarIframe"]; 🎜>二、

複製程式碼 代碼如下:
var a = (arguments.var a = (arguments. =0) ? WebCalendar.day[this.id.substr(8)].split("/") : arguments[0].split("/");

修改為

複製程式碼 程式碼如下:
var a = WebCalendar.day[this.id.substr(>
var a = WebCalendar.day[this.id.substr((8 )].split("/");


三、
複製代碼程式碼如下:

function dayMouseOver()
{
this.className = "over";
this.style.backgroundColor = WebCalendar.darkColor;
this.style.backgroundColor = WebCalendar.darkColor;
if(Calendararar>if(Calendarar. .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] ==& a[0] ==& a[0] ==& parseInt(WebCalendar.dateStyle[4], 10))
this.style.color = WebCalendar.lightColor;
this.style.color = WebCalendar.wordColor;
}
}


修改為複製程式碼
程式碼如下:


程式碼如下:


程式碼如下:function dayMouseOver()
{
this.className = "over";
bgbgbg=this.style.backgroundColor;
this.style.backgroundColor = WebCalendar.darColkor;
this.style.backgroundColor = WebCalendar.darColkoror
; ; .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(CalWebendarar .dateStyle[4], 10))
this.style.color = WebCalendar.lightColor; this.style.color = WebCalendar.wordColor; } }
相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
最新問題
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!