javascriptʵÏÖÄêÔÂÈÕµÄÁª¶¯Ñ¡Ôñ
<script type="text/javascript">
function dayChange(year,month,day){
var selectYear = document.getElementById(year);
var selectMonth = document.getElementById(month);
var selectDay = document.getElementById(day);
var y = selectYear.value,m = selectMonth.value,d = selectDay.value;
if(m==4||m==6||m==9||m==11){
if(selectDay.length == 31){
selectDay.options.remove(30);
}
if(selectDay.length == 29){
selectDay.options.add(30,30);
}
if(selectDay.length == 28){
selectDay.options.add(29,29);
selectDay.options.add(30,30);
}
}
if(m==1||m==3||m==5||m==7||m==8||m==10||m==12){
if(selectDay.length == 30){
selectDay.options.add(new Option(31,31));
}
if(selectDay.length == 29){
selectDay.options.add(new Option(30,30));
selectDay.options.add(new Option(31,31));
}
if(selectDay.length == 28){
selectDay.options.add(new Option(29,29));
selectDay.options.add(new Option(30,30));
selectDay.options.add(new Option(31,31));
}
}
if(m==2){
if(isRunYear(y)){
if(selectDay.length == 31){
selectDay.options.remove(30);
selectDay.options.remove(29);
}
if(selectDay.length == 30){
selectDay.options.remove(29);
}
if(sele
Ïà¹ØÎĵµ£º
insertAtCurson º¯Êý´úÁ½²ÎÊý·Ö±ðΪ¶ÔÏóºÍÊäÈëµÄ×Ö·û
function insertAtCursor(myField, myValue)
{
if (document.selection)
{
&nb ......
JavaScriptÀï×Ö·û´®ÀàÐÍת»»³ÉÈÕÆÚÀàÐÍ£º
Èç¹û×Ö·û´®ÖÐÓпոñ»òÊÇÆäËû·Ö¸î·û·Ö¸î£¬¿ÉÒÔÓÃsplit·½·¨ÏȲð·Ö£¬·µ»ØÒ»¸öÊý×飬ÔÙ°ÑÕâ¸öÊý×éÀïµÄÄêÔÂÈÕ×÷Ϊ²ÎÊý´«µ½new Date()ÀïÉú³ÉÈÕÆÚÀàÐÍ£»
Èç¹ýûÓÐÌØÊâ·Ö¸ô·û£¬¿ÉÒÔÓÃsubstr£¨x£¬y£©·½·¨À´È¡×Ó×Ö·û´®À´Éú³ÉÈÕÆÚ£¬substr£¨x£¬y£©Àx±íʾȡ×Ö´®µÄ¿ªÊ¼Î»Öã¬y±íʾ×Ó´®µÄ³ ......
Ò»¡¢»ù±¾Ê¹Ó÷½·¨
prototypeÊôÐÔ¿ÉËãÊÇJavaScriptÓëÆäËûÃæÏò¶ÔÏóÓïÑÔµÄÒ»´ó²»Í¬Ö®´¦¡£
¼ò¶øÑÔÖ®£¬prototype¾ÍÊÇ“Ò»¸ö¸øÀàµÄ¶ÔÏóÌí¼Ó·½·¨µÄ·½·¨”£¬Ê¹ÓÃprototypeÊôÐÔ£¬¿ÉÒÔ¸øÀද̬µØÌí¼Ó·½·¨£¬ÒÔ±ãÔÚJavaScriptÖÐʵÏÖ“¼Ì³Ð”µÄЧ¹û¡£
& ......
JavaScript»ù´¡
stringObject.charAt(index)·½·¨£º·µ»ØÖ¸¶¨Ë÷ÒýλÖô¦µÄ×Ö·û¡£
stringObject.slice(start,[end])ºÍstringObject.substring(start,[end])·½·¨¶¼½ÓÊÜÁ½¸ö²ÎÊý£¬·Ö±ðΪ×Ó×Ö·û´®µÄÆðʼλÖúÍÖÕֹλÖ㬷µ»ØÕâÁ½ÕßÖ®¼äµÄ×Ö·û´®£¬²»°üÀ¨ÖÕֹλÖõÄÄǸö×Ö·û´®¡£Èç¹û²»Ö¸¶¨µÚ¶þ¸ö²ÎÊý£¬ÔòĬÈÏΪ×Ö·û´®µÄ³¤¶È£¬¼´ ......
JavaScript¶¯Ì¬¼ÓÔØCSSµÄÈýÖÖ·½·¨ ÊÕ²Ø
Èç¹ûÄãÓкܶà¹ØÁªµÄCSSÎļþÒªÒ»Æð¼ÓÔØ£¬»òÕßÏ붯̬µÄ¼ÓÔز»Í¬µÄCSSÎļþ£¬ÄÇôÏÂÃæµÄ·½·¨ÄãÒ»¶¨¶ÔÄãÓаïÖú¡£
µÚÒ»ÖÖ£ºÒ»°ãÓÃÔÚÍⲿCSSÎļþÖмÓÔرØÐëµÄÎļþ
³ÌÐò´úÂë
@import url(style.css);
/*Ö»ÄÜÓÃÔÚCSSÎļþÖлòÕßstyle±êÇ©ÖÐ*/
µÚ¶þÖÖ£º¼òµ¥µÄÔÚÒ³ÃæÖмÓÔØÒ» ......