国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home JS special effects CSS3 special effects CSS3 year, month, day and date three-level linkage drop-down selection code

CSS3 year, month, day and date three-level linkage drop-down selection code

CSS3 year, month, day and date three-level linkage drop-down selection code

CSS3 year, month, day and date three-level linkage drop-down selection code

js code


<script language="JavaScript">   
function YYYYMMDDstart(){   
	MonHead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];   
	
	//先給年下拉框賦內(nèi)容   
	var y  = new Date().getFullYear();  
	for (var i = (y-30); i < (y+30); i++) //以今年為準(zhǔn),前30年,后30年   
		   document.reg_testdate.YYYY.options.add(new Option(" "+ i +" 年", i));   
	
	//賦月份的下拉框   
	for (var i = 1; i < 13; i++)   
		   document.reg_testdate.MM.options.add(new Option(" " + i + " 月", i));   
	
	document.reg_testdate.YYYY.value = y;   
	document.reg_testdate.MM.value = new Date().getMonth() + 1;   
	var n = MonHead[new Date().getMonth()];   
	if (new Date().getMonth() ==1 && IsPinYear(YYYYvalue)) n++;   
		writeDay(n); //賦日期下拉框Author:meizz   
	document.reg_testdate.DD.value = new Date().getDate();   
}   
if(document.attachEvent)   
	window.attachEvent("onload", YYYYMMDDstart);   
else   
window.addEventListener('load', YYYYMMDDstart, false);   
function YYYYDD(str) //年發(fā)生變化時(shí)日期發(fā)生變化(主要是判斷閏平年)   
{   
	var MMvalue = document.reg_testdate.MM.options[document.reg_testdate.MM.selectedIndex].value;   
	if (MMvalue == ""){ var e = document.reg_testdate.DD; optionsClear(e); return;}   
	var n = MonHead[MMvalue - 1];   
	if (MMvalue ==2 && IsPinYear(str)) n++;   
	writeDay(n)   
}   
function MMDD(str)   //月發(fā)生變化時(shí)日期聯(lián)動(dòng)   
{   
	var YYYYvalue = document.reg_testdate.YYYY.options[document.reg_testdate.YYYY.selectedIndex].value;   
	if (YYYYvalue == ""){ var e = document.reg_testdate.DD; optionsClear(e); return;}   
	var n = MonHead[str - 1];   
	if (str ==2 && IsPinYear(YYYYvalue)) n++;   
	writeDay(n)   
}   
function writeDay(n)   //據(jù)條件寫日期的下拉框   
{   
	var e = document.reg_testdate.DD; optionsClear(e);   
	for (var i=1; i<(n+1); i++)   
	e.options.add(new Option(" "+ i + " 日", i));   
}   
function IsPinYear(year)//判斷是否閏平年   
{
	return(0 == year%4 && (year%100 !=0 || year%400 == 0));
}   
function optionsClear(e)   
{   
	e.options.length = 1;   
}   
</script>
一款相當(dāng)簡單的js年月日日期三級(jí)聯(lián)動(dòng)下拉選擇代碼,select下拉框日期選擇js特效。 


Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

How can I create a fade-out effect using CSS3 transitions? How can I create a fade-out effect using CSS3 transitions?

28 Oct 2024

CSS3 Transitions: Achieving Fade-Out EffectsIn CSS3, transitions offer a powerful tool for creating dynamic visual effects. Among these effects is...

How Can You Mimic CSS3 Effects in Old IE Browsers? How Can You Mimic CSS3 Effects in Old IE Browsers?

28 Oct 2024

Emulating the Wonders of CSS3 Effects in Older IE BrowsersWhile CSS3 brings a plethora of stylish effects to web design, legacy browsers like...

How Can I Detect the Start and End of CSS3 Transitions? How Can I Detect the Start and End of CSS3 Transitions?

31 Dec 2024

Detecting CSS3 Transition EventsTransitions in CSS3 add dynamic effects to web elements, enhancing their responsiveness. However, it's often...

How to Create a Left-to-Right Background Color Fill with CSS Hover Effects? How to Create a Left-to-Right Background Color Fill with CSS Hover Effects?

29 Oct 2024

Creating Left-to-Right Background Color Fill with CSSIn CSS3, hover effects can be enhanced using transitions to create dynamic visual effects....

How to Achieve Defined Edges with CSS3 Blur Filter? How to Achieve Defined Edges with CSS3 Blur Filter?

16 Nov 2024

Achieving Defined Edges with CSS3 Filter BlurIncorporating CSS3 filters to blur images enhances visual effects. However, the default blur filter...

How Can I Create CSS3 Effects in Internet Explorer 7/8? How Can I Create CSS3 Effects in Internet Explorer 7/8?

28 Oct 2024

Emulating CSS3 Effects in Internet Explorer 7/8Many websites utilize CSS3's capabilities to enhance the appearance of elements using rounded...

Does 'transition: all' Slow Down CSS3 Transitions? Does 'transition: all' Slow Down CSS3 Transitions?

03 Dec 2024

Does "Transition: All" Hinder CSS3 Transition Speed?Using CSS3 transitions offers animated effects to web elements. A common practice is to employ...

Why is my slide-up animation using CSS3 @keyframes not working? Why is my slide-up animation using CSS3 @keyframes not working?

28 Oct 2024

CSS3 Transition - Fade Out EffectUsing CSS3, you can easily implement fade-out effects to enhance the user experience. However, if you encounter...

Csgo special effects blockbuster movies HD viewing entrance to watch Csgo high-definition special effects blockbuster movies directly Csgo special effects blockbuster movies HD viewing entrance to watch Csgo high-definition special effects blockbuster movies directly

04 Jun 2025

CSGO (Counter-Strike: Global Offensive) is a first-person shooter that is loved by players around the world. Its exciting competitions and high-quality special effects videos have always been topics to talk about by players. Whether it is the thrilling professional leagues or the friendly match between ordinary players, it can show amazing special effects and strategies in the game. This article will introduce you in detail how to find and watch CSGO special effects blockbusters in detail to ensure that you can experience the best visual enjoyment.

See all articles See all articles

Hot Tools

CSS text is combined into a heart-shaped animation special effect

CSS text is combined into a heart-shaped animation special effect

CSS text is combined into a heart-shaped animation special effect

CSS3 SVG expression flower animation special effects

CSS3 SVG expression flower animation special effects

SS3 SVG confession flower animation special effect is a Valentine's Day animation special effect.

CSS shopping mall websites commonly use left category drop-down navigation menu code

CSS shopping mall websites commonly use left category drop-down navigation menu code

CSS shopping mall websites commonly use left category drop-down navigation menu code

jQuery+CSS3 Valentine's Day love special effects

jQuery+CSS3 Valentine's Day love special effects

jQuery+CSS3 Valentine's Day Love Special Effect is a Valentine's Day hanging swinging heart animation special effect.

css3 spoon scooping up glutinous rice balls animation special effects

css3 spoon scooping up glutinous rice balls animation special effects

A bowl of cute glutinous rice balls expression, a spoon scooping up a glutinous rice balls animation special effects

Hot Article

Oguri Cap Build Guide | A Pretty Derby Musume
30 Jun 2025 Mobile Game Guide
Peak: How To Revive Players
22 Jun 2025 Mobile Game Guide
PEAK How to Emote
24 Jun 2025 Mobile Game Guide