修改Calendar日历控件 兼容IE9,谷歌,火狐。

只是能用,出现的位置有所不同,希望有高手再帮我改改吧,谢谢
 
一、
[javascript]  
this.iframe     = window.frames("meizzCalendarIframe");  
修改为
[javascript]  
this.iframe     = window.frames["meizzCalendarIframe"];  
 
二、
[javascript]  
var a = (arguments.length==0) ? WebCalendar.day[this.id.substr(8)].split("/") : arguments[0].split("/");  
 
修改为
[javascript]  
var a = WebCalendar.day[this.id.substr(8)].split("/");  
  
      
 
 
三、
[javascript] 
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;  
    }  
}  
修改为
[javascript] 
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;  
    }  
}  
 

修改Calendar(梅花雨)日历控件 兼容IE9 谷歌 火狐的更多相关文章

  1. 自己用js写的两个日历控件

    前一阵写了两个日历控件,做了简单的封装,发出来共朋友们参考. 第一个日历控件,条状的日历. (使用方法:调用initBarTime(id,evn),第一个参数是要渲染div的id,第二个参数是点击日期 ...

  2. 分享一个WPF下日历控件(Calendar)的样式

    WPF日历控件的一个样式 WPF自带的日历控件样式可能会比较丑,要修改其样式看起来挺复杂的,实际上很简单,用Blend打开,修改三个模板,基本就能改变全部面貌,也很容易 先上图 样式如下: <S ...

  3. WPF 4 日历控件(Calendar)

    原文:WPF 4 日历控件(Calendar)      在之前我已经写过两篇关于WPF 4 任务栏(Taskbar)相关的特性.相信自从VS2010 Beta 版放出后,WPF 的粉丝们肯定在第一时 ...

  4. WPF Calendar 日历控件 样式自定义

    原文:WPF Calendar 日历控件 样式自定义 粗略的在代码上做了些注释 blend 生成出来的模版 有的时候 会生成 跟 vs ui界面不兼容的代码 会导致可视化设计界面 报错崩溃掉 但是确不 ...

  5. asp.net Calendar 日历控件用法

    asp.net Calendar 是微软自带的一款日历控件,除了简单显示日期时间外, 还可以绑定一些需要的事件. Calendar_DayRender 事件,是在加载都去时间日期时候的方法,用此方法可 ...

  6. asp.net 弹出式日历控件 选择日期 Calendar控件

    原文地址:asp.net 弹出式日历控件 选择日期 Calendar控件 作者:逸苡 html代码: <%@ Page Language="C#" CodeFile=&quo ...

  7. 2.23 js处理日历控件(修改readonly属性)

    2.23 js处理日历控件(修改readonly属性) 前言    日历控件是web网站上经常会遇到的一个场景,有些输入框是可以直接输入日期的,有些不能,以我们经常抢票的12306网站为例,详细讲解如 ...

  8. Ext.net Calendar 控件在有模板页的时候,模板页定义了TD的样式造成日历控件的样式丢掉

    Ext.net Calendar 控件在有模板页的时候,模板页定义了TD的样式造成日历控件的样式丢掉 解决方案 在本页面添加下面的样式 <style type="text/css&qu ...

  9. Selenium2+python自动化25-js处理日历控件(修改readonly属性)

    前言 日历控件是web网站上经常会遇到的一个场景,有些输入框是可以直接输入日期的,有些不能,以我们经常抢票的12306网站为例,详细讲解如何解决日历控件为readonly属性的问题. 基本思路:先用j ...

随机推荐

  1. SVN版本回滚~

    如果你在svn上对文件进行编辑作了修改,想撤销,那么有两种方法可以还原:1) svn revert <yourfile>2) 手动删除该文件,重新执行svn up(rm <yourf ...

  2. Redux1

    Redux 写在前面 写React也有段时间了,一直也是用Redux管理数据流,最近正好有时间分析下源码,一方面希望对Redux有一些理论上的认识:另一方面也学习下框架编程的思维方式. Redux如何 ...

  3. SharePoint ListTemplateType enumeration

    from microsoft http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.client.listtempla ...

  4. C# static成员的构造顺序

    熟知的几个原则 1.static字段初始化先于static构造函数 2.static字段按顺序初始化 3.static字段和static构造函数只执行一次 public class Foo { pub ...

  5. Wine install, 卸载的方法

    EL6 (RHEL6 and SL6) Required packages for proper building of 32-bit Wine on 64-bit EL6 yum install - ...

  6. COJ 0047 20702最大乘积

    20702最大乘积 难度级别:B: 运行时间限制:1000ms: 运行空间限制:51200KB: 代码长度限制:2000000B 试题描述 输入n个元素组成的序列s,你需要找出一个乘积最大的连续子序列 ...

  7. 【图论】【宽搜】【染色】NCPC 2014 A Ades

    题目链接: http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1787 题目大意: N个点M条无向边(N,M<=200000),一个节点只能有一个 ...

  8. Velocity常用方法

    1.字符串替换 replace#if($!{name} != '')#set($tempName = $!{name})#set($tempName = $tempName.Replace('abc' ...

  9. spj 设计

    在数据库中使用SELECT INTO 语句从SP.J.P表中创建一个新表J_P_SPJ新表J_P_QTY中的属性列包括:工程号 (JNO).工程名(JNAME).零件号(PNO).零件名(PNAME) ...

  10. [Theano] Theano初探

    1. Theano用来干嘛的? Theano was written at the LISA lab to support rapid development of efficient machine ...