当前位置:首页 > 代码 > 正文

谷歌日历源代码(谷歌开源代码)

admin 发布:2022-12-20 00:23 138


本篇文章给大家谈谈谷歌日历源代码,以及谷歌开源代码对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

日历代码

万年历代码:

iframe

src=""

width="509"

height=433

marginwidth="0"

marginheight="0"

hspace="0"

vspace="0"

frameborder="0"

scrolling="no"/iframe

老黄历的源代码:

IFRAME

style="BORDER-RIGHT:

#000000

1px

dotted;

BORDER-TOP:

#000000

1px

dotted;

BORDER-LEFT:

#000000

1px

dotted;

BORDER-BOTTOM:

#000000

1px

dotted"

border=0

name=nongli

marginHeight=0

src=""

frameBorder=no

width=149

scrolling=no

height=140/IFRAME

最新日历代码(包括日历、星期、现在时间)

IFRAME

border=0

name=www1.xise.cn

align=center

marginWidth=0

marginHeight=0

src=""

frameBorder=0

width=146

scrolling=no

height=183/IFRAME

代码一:IFRAME

style="BORDER-RIGHT:

#000000

1px

dotted;

BORDER-TOP:

#000000

1px

dotted;

BORDER-LEFT:

#000000

1px

dotted;

BORDER-BOTTOM:

#000000

1px

dotted"

border=0

name=nongli

marginHeight=0

src=""

frameBorder=no

width=149

scrolling=no

height=140/IFRAME

代码二:iframe

name="jiro23"

src=""

width="500"

height="500"/iframe

代码三:iframe

scrolling=no

height=170

width=165

frameborder=0

marginHeight=0

marginWidth=0

src=;/iframe

具体步骤是:复制代码---管理博客-----新增空白面板-----钩选显示源代码(出现钩号,同时文档里出现DIV的字样)----粘贴代码----钩选显示源代码(钩号消失)-----保存新增面板----定制个人首页----选取新增个人面板----保存设置

求网页中的日历控件代码

绝对漂亮

Script LANGUAGE="JavaScript"

var months = new Array("一", "二", "三","四", "五", "六", "七", "八", "九","十", "十一", "十二");

var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31,30, 31, 30, 31);

var days = new Array("日","一", "二", "三","四", "五", "六");

var classTemp;

var today=new getToday();

var year=today.year;

var month=today.month;

var newCal;

function getDays(month, year) {

if (1 == month) return ((0 == year % 4) (0 != (year % 100))) ||(0 == year % 400) ? 29 : 28;

else return daysInMonth[month];

}

function getToday() {

this.now = new Date();

this.year = this.now.getFullYear();

this.month = this.now.getMonth();

this.day = this.now.getDate();

}

function Calendar() {

newCal = new Date(year,month,1);

today = new getToday();

var day = -1;

var startDay = newCal.getDay();

var endDay=getDays(newCal.getMonth(), newCal.getFullYear());

var daily = 0;

if ((today.year == newCal.getFullYear()) (today.month == newCal.getMonth()))

{

day = today.day;

}

var caltable = document.all.caltable.tBodies.calendar;

var intDaysInMonth =getDays(newCal.getMonth(), newCal.getFullYear());

for (var intWeek = 0; intWeek caltable.rows.length;intWeek++)

for (var intDay = 0;intDay caltable.rows[intWeek].cells.length;intDay++)

{

var cell = caltable.rows[intWeek].cells[intDay];

var montemp=(newCal.getMonth()+1)10?("0"+(newCal.getMonth()+1)):(newCal.getMonth()+1);

if ((intDay == startDay) (0 == daily)){ daily = 1;}

var daytemp=daily10?("0"+daily):(daily);

var d=""+newCal.getFullYear()+"-"+montemp+"-"+daytemp+"";

if(day==daily) cell.className="DayNow";

else if(intDay==6) cell.className = "DaySat";

else if (intDay==0) cell.className ="DaySun";

else cell.className="Day";

if ((daily 0) (daily = intDaysInMonth))

{

cell.innerText = daily;

daily++;

} else

{

cell.className="CalendarTD";

cell.innerText = "";

}

}

document.all.year.value=year;

document.all.month.value=month+1;

}

function subMonth()

{

if ((month-1)0)

{

month=11;

year=year-1;

} else

{

month=month-1;

}

Calendar();

}

function addMonth()

{

if((month+1)11)

{

month=0;

year=year+1;

} else

{

month=month+1;

}

Calendar();

}

function setDate()

{

if (document.all.month.value1||document.all.month.value12)

{

alert("月的有效范围在1-12之间!");

return;

}

year=Math.ceil(document.all.year.value);

month=Math.ceil(document.all.month.value-1);

Calendar();

}

/Script

Script

function buttonOver()

{

var obj = window.event.srcElement;

obj.runtimeStyle.cssText = "background-color:#FFFFFF";

// obj.className="Hover";

}

function buttonOut()

{

var obj = window.event.srcElement;

window.setTimeout(function(){obj.runtimeStyle.cssText = "";},300);

}

/Script

script

function getDiary(id){

y=document.getElementById("year").value;

d=document.getElementById("month").value;

document.getElementById("showdate").value=y+"-"+d+"-"+event.srcElement.innerHTML;

document.getElementById("showdate").style.cssText="text-align:center"; //文字居中显示

document.getElementById("caltable").style.display="none";}

/script

!--这里还可以用CSS对button和text框进行美化--

input type="text" id=showdateinput type="button" id=controlcalendar value="日历" onclick="javascript:document.getElementById('caltable').style.display='';"

table border="0" cellpadding="0" cellspacing="1" class="Calendar" id="caltable" style="display:none"

thead

tr align="center" valign="middle"

td colspan="7" class="Title"

a href="javaScript:subMonth();" title="上一月" Class="DayButton"3/a input name="year" id="year" type="text" size="4" maxlength="4" onkeydown="if (event.keyCode==13){setDate()}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onpaste="this.value=this.value.replace(/[^0-9]/g,'')" 年 input name="month" id="month" type="text" size="1" maxlength="2" onkeydown="if (event.keyCode==13){setDate()}" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onpaste="this.value=this.value.replace(/[^0-9]/g,'')" 月 a href="JavaScript:addMonth();" title="下一月" Class="DayButton"4/a

/td

/tr

tr align="center" valign="middle"

Script LANGUAGE="JavaScript"

document.write("TD class=DaySunTitle id=diary " + days[0] + "/TD");

for (var intLoop = 1; intLoop days.length-1;intLoop++)

document.write("TD class=DayTitle id=diary" + days[intLoop] + "/TD");

document.write("TD class=DaySatTitle id=diary" + days[intLoop] + "/TD");

/Script

/TR

/thead

TBODY border=1 cellspacing="0" cellpadding="0" ID="calendar" ALIGN=CENTER ONCLICK="getDiary()"

Script LANGUAGE="JavaScript"

for (var intWeeks = 0; intWeeks 6; intWeeks++)

{

document.write("TR style='cursor:hand'");

for (var intDays = 0; intDays days.length;intDays++) document.write("TD class=CalendarTD onMouseover='buttonOver();' onMouseOut='buttonOut();'/TD");

document.write("/TR");

}

/Script

/TBODY

/TABLE

Style

Input {font-family: verdana;font-size: 9pt;text-decoration: none;background-color: #FFFFFF;height: 20px;border: 1px solid #666666;color:#000000;}

.Calendar {font-family: verdana;text-decoration: none;width: 170;background-color: #C0D0E8;font-size: 9pt;border:0px dotted #1C6FA5;}

.CalendarTD {font-family: verdana;font-size: 7pt;color: #000000;background-color:#f6f6f6;height: 20px;width:11%;text-align: center;}

.Title {font-family: verdana;font-size: 11pt;font-weight: normal;height: 24px;text-align: center;color: #333333;text-decoration: none;background-color: #A4B9D7;border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-bottom-style:1px;border-top-color: #999999;border-right-color: #999999;border-bottom-color: #999999;border-left-color: #999999;}

.Day {font-family: verdana;font-size: 7pt;color:#243F65;background-color: #E5E9F2;height: 20px;width:11%;text-align: center;}

.DaySat {font-family: verdana;font-size: 7pt;color:#FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;}

.DaySun {font-family: verdana;font-size: 7pt;color: #FF0000;text-decoration: none;background-color:#E5E9F2;text-align: center;height: 18px;width: 12%;}

.DayNow {font-family: verdana;font-size: 7pt;font-weight: bold;color: #000000;background-color: #FFFFFF;height: 20px;text-align: center;}

.DayTitle {font-family: verdana;font-size: 9pt;color: #000000;background-color: #C0D0E8;height: 20px;width:11%;text-align: center;}

.DaySatTitle {font-family: verdana;font-size: 9pt;color:#FF0000;text-decoration: none;background-color:#C0D0E8;text-align: center;height: 20px;width: 12%;}

.DaySunTitle {font-family: verdana;font-size: 9pt;color: #FF0000;text-decoration: none;background-color: #C0D0E8;text-align: center;height: 20px;width: 12%;}

.DayButton {font-family: Webdings;font-size: 9pt;font-weight: bold;color: #243F65;cursor:hand;text-decoration: none;}

/Style

Script LANGUAGE="JavaScript"

Calendar();

/Script

不能这样么Calendar cl= new Calendar();

看到你这么一个问题,我突然发现时间长了,Java的基础我都忘记了。

我已经不确认,抽象类是否可以直接 new ;

我刚刚看了 Calendar 的源代码,这个Calendar 的构造函数是 protected,所以你也是不可能在你的代码中直接 new.

一般用法:

Calendar rightNow = Calendar.getInstance();

谷歌日历源代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于谷歌开源代码、谷歌日历源代码的信息别忘了在本站进行查找喔。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/31975.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载