">
欢迎来到天天文库
浏览记录
ID:6131975
大小:289.00 KB
页数:19页
时间:2018-01-04
《利用html和javascript技术写的简单用户注册界面(网页)表单验证》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、效果图代码
2、t.getElementById("LoftyYear");varindex=myselect.selectedIndex;myselect.options[index].value;vargh=myselect.options[index].text;return(gh);}functionmgetxuanxian()//获取被选择的月份然后赋给gh变量在返回gh{varmyselect=document.getElementById("LoftyMonth");varindex=myselect.selectedIndex;myselect.options[i
3、ndex].value;vargh=myselect.options[index].text;return(gh);}functiondgetxuanxian(){//获取被选择的日期然后赋给gh变量在返回ghvarmyselect=document.getElementById("LoftyDay");varindex=myselect.selectedIndex;myselect.options[index].value;vargh=myselect.options[index].text;return(gh);}functionsetDay(obj){//这
4、整一块是动态的给“日”期下拉框添加选项obj=obj.form;varyears=parseInt(obj.years.options[obj.years.selectedIndex].value);varmonths=parseInt(obj.months.options[obj.months.selectedIndex].value);if(obj.years.selectedIndex==0
5、
6、obj.months.selectedIndex==0)return;varlastday=monthday(years,months);varitemnum=obj
7、.days.length;if(lastday-18、,31);if(((years%4==0)&&(years%100!=0))9、10、(years%400==0)){lastday[1]=29;}returnlastday[months-1];}functionforto(ff,to){document.write('');for(varii=ff;ii<=to;ii++)document.write(''+ii+'');}functiona(){alert(document.all("years").va11、lue+"年"+document.all("months").value+"月"+document.all("days").value+"日");}functionshowlist()//用信息框输出用户信息{varavarbvarcvarabvarsel=0;for(vari=0;i12、Name(
8、,31);if(((years%4==0)&&(years%100!=0))
9、
10、(years%400==0)){lastday[1]=29;}returnlastday[months-1];}functionforto(ff,to){document.write('');for(varii=ff;ii<=to;ii++)document.write(''+ii+'');}functiona(){alert(document.all("years").va
11、lue+"年"+document.all("months").value+"月"+document.all("days").value+"日");}functionshowlist()//用信息框输出用户信息{varavarbvarcvarabvarsel=0;for(vari=0;i12、Name(
12、Name(
此文档下载收益归作者所有