计算退休年龄js怎么写,自定义年龄计算退休时间js怎么实现

最近在研究js,看到一个工具比较新颖,在线计算退休时间、退休年龄的工具,如下:http://www.chinawe.net/tools/tuixiunianling/

可以自定义时间和退休年龄,还能得出工作天数。

这个其实就是通过js计算出来的,下面将js代码附上

function y2k(number){return (number < 1000) ? number + 1900 : number;
}function daysElapsed(date1,date2){var difference =Date.UTC(y2k(date1.getYear()),date1.getMonth(),date1.getDate(),0,0,0)- Date.UTC(y2k(date2.getYear()),date2.getMonth(),date2.getDate(),0,0,0);return difference/1000/60/60/24;
}function HowManyDays(){var m = document.retire.MyMonth.options[document.retire.MyMonth.selectedIndex].value;var d = document.retire.MyDay.options[document.retire.MyDay.selectedIndex].value;var y = document.retire.MyYear.options[document.retire.MyYear.selectedIndex].value;var birthdate = new Date(y,m,d);var retireage = document.retire.age.options[document.retire.age.selectedIndex].value * 1;var mo = 0;if (retireage != Math.round(retireage)){retireage = Math.floor(retireage);mo = 6;}var retiredate = new Date(y2k(birthdate.getYear()) + retireage, birthdate.getMonth() + mo, birthdate.getDate());var months = new Array('涓€鏈�','浜屾湀','涓夋湀','鍥涙湀','浜旀湀','鍏湀','涓冩湀','鍏湀','涔濇湀','鍗佹湀','鍗佷竴鏈�','鍗佷簩鏈�');var day  = retiredate.getDate();var month = months[retiredate.getMonth()];var year = y2k(retiredate.getYear());var numdays = daysElapsed(retiredate, new Date()); document.retire.oretiredate.value = year + '骞� '+ month + ' ' + day + '鏃�';document.retire.oretiredays.value = numdays + '澶�';document.retire.oworkdays.value = Math.round(numdays * 5 / 7) + '澶�';
}

还有其他工具也是的,例如

安全期计算器

js代码如下:

function CalculatePre(type) {time = $("#"+type).val();iYear = parseInt(time.split("-")[0]);iMonth = parseInt(time.split("-")[1]);iDay = parseInt(time.split("-")[2]);if(!chkDate(time)){alert("鏃ユ湡鏍煎紡杈撳叆鏈夎锛屼緥濡�2018-11-11");$("#"+type).focus();return false;}if(!iYear || !iMonth || !iDay){alert("鏃ユ湡鏍煎紡杈撳叆鏈夎锛屼緥濡�2018-11-11");$("#"+type).focus();return false;}if(type == 'LastPer'){average = $("#averagePer").val();if(!average){alert("璇烽€夋嫨骞冲潎鏈堢粡鍛ㄦ湡");$("#averagePer").focus();return false;}perior = 280+parseInt(average)-28;ov =  DateAdd(iMonth+'/'+iDay+'/'+iYear,parseInt(average)-28);ovTime = ov.getFullYear()+'-'+(ov.getMonth()+1) +'-'+ ov.getDate();}PreDay = DateAdd(iMonth+'/'+iDay+'/'+iYear,perior);$("#Result"+type).val(PreDay.getFullYear()+'骞�'+ (PreDay.getMonth()+1)+'鏈�'+PreDay.getDate()+'鏃�');now = new Date();now1 = now.getFullYear()+'-'+ (now.getMonth()+1)+'-'+now.getDate();betweenday = daysBetween(PreDay.getFullYear()+'-'+(PreDay.getMonth()+1)+'-'+PreDay.getDate(),now1);if(betweenday>0) {$('#Result'+type+'Day').val(betweenday);week = parseInt(daysBetween(now1,ovTime)/7)+1;if(week>0 && betweenday<266 ) {$("#P"+type+'Day').val(week);$("#W"+type).show();} else {$("#W"+type).hide();}$("#daybetween"+type).show();} else {$("#W"+type).hide();$("#daybetween"+type).hide();}$("#"+type+'R').show();
}function DateAdd(time,Number) {return new Date(Date.parse(time)+(86400000*Number));
}function daysBetween(DateOne,DateTwo) {var OneYear = parseInt(DateOne.split("-")[0]);var OneMonth = parseInt(DateOne.split("-")[1]);var OneDay = parseInt(DateOne.split("-")[2]);var TwoYear = parseInt(DateTwo.split("-")[0]);var TwoMonth = parseInt(DateTwo.split("-")[1]);var TwoDay = parseInt(DateTwo.split("-")[2]);var cha = ((Date.parse(OneMonth+'/'+OneDay+'/'+OneYear)-Date.parse(TwoMonth+'/'+TwoDay+'/'+TwoYear))/86400000);return cha;
}function ShowMorePre() {$('#morePre').show();$('#morePre1').show();
}function chkDate(sDate) {var r = /\d{4}(?:-\d{1,2}){0,2}///姝e垯琛ㄨ揪寮忥紝鍒ゆ柇鏄惁涓簓yyy-mm-dd,yyyy-mm,yyyy鏍煎紡if(sDate.match(r) == sDate) {var arr = sDate.split("-")switch(arr.length) {//鏍规嵁涓嶅悓鐨剏yyy-mm-dd,yyyy-mm鏍煎紡鍒ゆ柇骞存湀鏃ユ暟瀛楁槸鍚︽纭�case 3:arr[1]=arr[1]-1;var tmpDate=new Date(arr[0],arr[1],arr[2]);if(tmpDate.getMonth()==arr[1] && tmpDate.getFullYear()==arr[0]) return true;break;case 2:if(arr[1]<13) return true;break;default:return false;}}return false;
}var ydate;function fGetDaysInMonth(iMonth, iYear) {var dPrevDate = new Date(iYear, iMonth, 0);return dPrevDate.getDate();
}function fBuildCal(iYear,iMonth,LastP,ThisP,NextP,LastY,ThisY,NextY) {colorBg = new Array();colorBg[0] = new Array(7);colorBg[1] = new Array(7);colorBg[2] = new Array(7);colorBg[3] = new Array(7);colorBg[4] = new Array(7);colorBg[5] = new Array(7);colorBg[6] = new Array(7);var aMonth = new Array();aMonth[0] = new Array(7);aMonth[1] = new Array(7);aMonth[2] = new Array(7);aMonth[3] = new Array(7);aMonth[4] = new Array(7);aMonth[5] = new Array(7);aMonth[6] = new Array(7);var dCalDate = new Date(iYear, iMonth-1, 1);var LP= new Array();var TP= new Array();var NP= new Array();var LY= new Array();var TY= new Array();var NY= new Array();var iDayOfFirst = dCalDate.getDay();var iDaysInMonth = fGetDaysInMonth(iMonth, iYear);var iVarDate = 1;var i, d, w;aMonth[0][0] = "鏃�";aMonth[0][1] = "涓€";aMonth[0][2] = "浜�";aMonth[0][3] = "涓�";aMonth[0][4] = "鍥�";aMonth[0][5] = "浜�";aMonth[0][6] = "鍏�";LP[0] = parseInt(LastP['s'].getFullYear()*10000+(LastP['s'].getMonth()+1)*100+LastP['s'].getDate());LP[1] = parseInt(LastP['e'].getFullYear()*10000+(LastP['e'].getMonth()+1)*100+LastP['e'].getDate());TP[0] = parseInt(ThisP['s'].getFullYear()*10000+(ThisP['s'].getMonth()+1)*100+ThisP['s'].getDate());TP[1] = parseInt(ThisP['e'].getFullYear()*10000+(ThisP['e'].getMonth()+1)*100+ThisP['e'].getDate());NP[0] = parseInt(NextP['s'].getFullYear()*10000+(NextP['s'].getMonth()+1)*100+NextP['s'].getDate());NP[1] = parseInt(NextP['e'].getFullYear()*10000+(NextP['e'].getMonth()+1)*100+NextP['e'].getDate());LY[0] = parseInt(LastY['s'].getFullYear()*10000+(LastY['s'].getMonth()+1)*100+LastY['s'].getDate());LY[1] = parseInt(LastY['e'].getFullYear()*10000+(LastY['e'].getMonth()+1)*100+LastY['e'].getDate());TY[0] = parseInt(ThisY['s'].getFullYear()*10000+(ThisY['s'].getMonth()+1)*100+ThisY['s'].getDate());TY[1] = parseInt(ThisY['e'].getFullYear()*10000+(ThisY['e'].getMonth()+1)*100+ThisY['e'].getDate());NY[0] = parseInt(NextY['s'].getFullYear()*10000+(NextY['s'].getMonth()+1)*100+NextY['s'].getDate());NY[1] = parseInt(NextY['e'].getFullYear()*10000+(NextY['e'].getMonth()+1)*100+NextY['e'].getDate());for (d = iDayOfFirst; d < 7; d++) {aMonth[1][d] = iVarDate;value = iVarDate+iMonth*100+iYear*10000;if((LP[0] <= value && LP[1] >=value) || (TP[0] <= value && TP[1] >=value) || (NP[0] <= value && NP[1] >=value))colorBg[1][d] = 'class="date_3" title="杩欐槸鎺掑嵉鏈燂紝鎬х敓娲诲彈瀛曞彲鑳芥€уぇ" bgcolor="#ED1B23"';else if((LY[0] <= value && LY[1] >=value) || (TY[0] <= value && TY[1] >=value) || (NY[0] <= value && NY[1] >=value))colorBg[1][d] = 'class="date_1" title="杩欐槸鏈堢粡鏈燂紝娉ㄦ剰缁忔湡鍗敓锛岃閬垮厤鎬х敓娲�" bgcolor="#FAA619"';else colorBg[1][d] = 'class="date_2" title="杩欐槸瀹夊叏鏈燂紝鎬х敓娲讳竴鑸笉鍙楀瓡" bgcolor="#17A40C"';iVarDate++;}for (w = 2; w < 7; w++) {for (d = 0; d < 7; d++) {if (iVarDate <= iDaysInMonth) {value = iVarDate+iMonth*100+iYear*10000;aMonth[w][d] = iVarDate;if((LP[0] <= value && LP[1] >=value) || (TP[0] <= value && TP[1] >=value) || (NP[0] <= value && NP[1] >=value))colorBg[w][d] = 'class="date_3" title="杩欐槸鎺掑嵉鏈燂紝鎬х敓娲诲彈瀛曞彲鑳芥€уぇ" bgcolor="#ED1B23"';else if((LY[0] <= value && LY[1] >=value) || (TY[0] <= value && TY[1] >=value) || (NY[0] <= value && NY[1] >=value))colorBg[w][d] = 'class="date_1" title="杩欐槸鏈堢粡鏈燂紝娉ㄦ剰缁忔湡鍗敓锛岃閬垮厤鎬х敓娲�" bgcolor="#FAA619"';else colorBg[w][d] = 'class="date_2" title="杩欐槸瀹夊叏鏈燂紝鎬х敓娲讳竴鑸笉鍙楀瓡" bgcolor="#17A40C" ';iVarDate++;}}}return aMonth;
}function fDrawCal(iYear, iMonth,myMonth,element) {var calendar_str;calendar_str = '<table ';if(element=='calendar2')calendar_str += 'style="left:340px"';calendar_str += 'class="date" border="0" cellpadding="0" cellspacing="0">';calendar_str += "<tr>";calendar_str += "<th>" + myMonth[0][0] + "</th>";calendar_str += "<th>" + myMonth[0][1] + "</th>";calendar_str += "<th>" + myMonth[0][2] + "</th>";calendar_str += "<th>" + myMonth[0][3] + "</th>";calendar_str += "<th>" + myMonth[0][4] + "</th>";calendar_str += "<th>" + myMonth[0][5] + "</th>";calendar_str += "<th>" + myMonth[0][6] + "</th>";calendar_str += "</tr>";calendar_str +='<tr><td colspan="7" class="caption">'+ iYear+' 骞� '+ iMonth+' 鏈�</td></tr>';for (w = 1; w <= 6; w++) {calendar_str += w == 6 ? "<tr class=\"date_end\">" : "<tr>";for (d = 0; d < 7; d++) {calendar_str +='<td ';if(colorBg[w][d])calendar_str +=colorBg[w][d];calendar_str +='>';if(myMonth[w][d])calendar_str += myMonth[w][d];else calendar_str +="&nbsp;";calendar_str +="</td>";}calendar_str +="</tr>";}calendar_str +="</table>";$("#"+element).html(calendar_str);
}function getP(idate,average) {var P= new Array();P['s'] = DateAdd((idate.getMonth()+1)+'/'+idate.getDate()+'/'+idate.getFullYear(),average-17);P['e'] = DateAdd((idate.getMonth()+1)+'/'+idate.getDate()+'/'+idate.getFullYear(),average-12);return P; 
}function getLastP(idate,average) {var PreDay = new Array();PreDay =getLastY(idate,average);return getP(PreDay['s'],average);
}function getThisP(idate,average) {return getP(idate,average);
}function getNextP(idate,average) {var PreDay = new Array();PreDay =getNextY(idate,average);return getP(PreDay['s'],average);
}function getLastY(idate,average) {var PreDay = new Array();PreDay['s'] = DateAdd((idate.getMonth()+1)+'/'+idate.getDate()+'/'+idate.getFullYear(),0-average);PreDay['e'] = DateAdd((idate.getMonth()+1)+'/'+idate.getDate()+'/'+idate.getFullYear(),0-average+ydate);return PreDay;
}function getThisY(idate,average) {var PreDay = new Array();PreDay['s'] = idate;PreDay['e'] = DateAdd((idate.getMonth()+1)+'/'+idate.getDate()+'/'+idate.getFullYear(),ydate);return PreDay;
}function getNextY(idate,average) {var PreDay = new Array();PreDay['s'] = DateAdd((idate.getMonth()+1)+'/'+idate.getDate()+'/'+idate.getFullYear(),average);PreDay['e'] = DateAdd((idate.getMonth()+1)+'/'+idate.getDate()+'/'+idate.getFullYear(),average+ydate);return PreDay;
}function ReculerP(iYear,iMonth,iDay,average) {tmp = new Date(iYear,iMonth-1,iDay);LastP = getLastP(tmp,average);ThisP = getThisP(tmp,average);NextP = getNextP(tmp,average);LastY = getLastY(tmp,average);ThisY = getThisY(tmp,average);NextY = getNextY(tmp,average);myMonth = fBuildCal(iYear,iMonth,LastP,ThisP,NextP,LastY,ThisY,NextY);fDrawCal(iYear, iMonth,myMonth,'calendar1');if(iMonth+1 >12){ iMonth = 1; iYear+=1;}else iMonth += 1;tmp = NextY['s'];if((tmp.getMonth+1)<iMonth)tmp = getNextY(tmp,average)['s'];LastP = getLastP(tmp,average);ThisP = getThisP(tmp,average);NextP = getNextP(tmp,average);LastY = getLastY(tmp,average);ThisY = getThisY(tmp,average);NextY = getNextY(tmp,average);myMonth = fBuildCal(iYear,iMonth,LastP,ThisP,NextP,LastY,ThisY,NextY);fDrawCal(iYear, iMonth,myMonth,'calendar2');
}function DateAdd(time,Number) { return new Date(Date.parse(time) + (86400000 * Number));  
} function chkDate(sDate) {var r=/\d{4}(?:-\d{1,2}){0,2}///姝e垯琛ㄨ揪寮忥紝鍒ゆ柇鏄惁涓簓yyy-mm-dd,yyyy-mm,yyyy鏍煎紡if(sDate.match(r)==sDate){var arr=sDate.split("-")switch(arr.length){//鏍规嵁涓嶅悓鐨剏yyy-mm-dd,yyyy-mm鏍煎紡鍒ゆ柇骞存湀鏃ユ暟瀛楁槸鍚︽纭�case 3:arr[1] = arr[1]-1;var tmpDate=new Date(arr[0],arr[1],arr[2]);if(tmpDate.getMonth()==arr[1] && tmpDate.getFullYear()==arr[0]) return true;break;case 2:if(arr[1]<13) return true;break;default:return false;}}return false;
}function DrawCalendar() {$('#calendar1').html();$('#calendar2').html();year = $("#wyear").val();month = $("#wmonth").val();day = $("#wday").val();time = year+'-'+month+'-'+day;if(!chkDate(time)){alert("鏃ユ湡鏍煎紡杈撳叆鏈夎锛岃杩斿洖妫€鏌�");$('#wyear').focus();return false;}iYear = parseInt(time.split("-")[0]);//ydate = parseInt(document.getElementById("ydate").value)-1;ydate = 4;iMonth = parseInt(time.split("-")[1]);iDay = parseInt(time.split("-")[2]);if(!iYear || !iMonth || !iDay) {alert("鏃ユ湡鏍煎紡杈撳叆鏈夎锛岃杩斿洖妫€鏌�");$('#wyear').focus();return false;}average = $("#wperiod").val();ReculerP(iYear,iMonth,iDay,average);document.getElementById('wresult').style.display = '';var c1 = document.getElementById('calendar1').innerHTML;var c2 = document.getElementById('calendar2').innerHTML;var c = '<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top">娴嬭瘯缁撴灉锛�</td><td>'+c1+'</td><td width="10">&nbsp;</td><td>'+c2+'</td></tr></table>';var i = '';return {c:c, i:i};
}function wInit() {document.getElementById('wresult').style.display = 'none';var d = new Date();d.setMonth(d.getMonth() - 1);document.getElementById('wyear').value = d.getFullYear();document.getElementById('wmonth').value = d.getMonth() + 1;document.getElementById('wday').value = d.getDate();document.getElementById('wyear').onclick = function(event) {WdatePicker({dateFmt:'yyyy',minDate:'1901', maxDate:'2050'})};document.getElementById('wmonth').onclick = function(event) {WdatePicker({dateFmt:'M'})};document.getElementById('wday').onclick = function(event) {WdatePicker({dateFmt:'d'})};var p = document.getElementById('wperiod');for (var i = 20; i <= 45; i++) {p.options.add(new Option(i + '澶�', i));}p.options[8].selected = true;
}function handleWork(obj) {var v = obj.value;obj.disabled = true;// global callbackhandleBegin();var res = DrawCalendar();if (typeof res == 'object' && res != null) {// global callbackhandleFinish(res.c, res.i);}obj.value = v;obj.disabled = false;
}

 农历阳历转换

js代码如下:

<!--
function CalConv(M){FIRSTYEAR = 1936;LASTYEAR = 2031;LunarCal = [new tagLunarCal(23, 3, 2, 17, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0 ), /* 1936 */ new tagLunarCal( 41, 0, 4, 23, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ), new tagLunarCal( 30, 7, 5, 28, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ), new tagLunarCal( 49, 0, 6, 33, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ), new tagLunarCal( 38, 0, 0, 38, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ), /* 1940 */ new tagLunarCal( 26, 6, 2, 44, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ), new tagLunarCal( 45, 0, 3, 49, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ), new tagLunarCal( 35, 0, 4, 54, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ), new tagLunarCal( 24, 4, 5, 59, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ), /* 1944 */ new tagLunarCal( 43, 0, 0, 5, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ), new tagLunarCal( 32, 0, 1, 10, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ), new tagLunarCal( 21, 2, 2, 15, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ), new tagLunarCal( 40, 0, 3, 20, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ), /* 1948 */ new tagLunarCal( 28, 7, 5, 26, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ), new tagLunarCal( 47, 0, 6, 31, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1 ), new tagLunarCal( 36, 0, 0, 36, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ), new tagLunarCal( 26, 5, 1, 41, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ), /* 1952 */ new tagLunarCal( 44, 0, 3, 47, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1 ), new tagLunarCal( 33, 0, 4, 52, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ), new tagLunarCal( 23, 3, 5, 57, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ), new tagLunarCal( 42, 0, 6, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ), /* 1956 */ new tagLunarCal( 30, 8, 1, 8, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 ), new tagLunarCal( 48, 0, 2, 13, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 ), new tagLunarCal( 38, 0, 3, 18, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ), new tagLunarCal( 27, 6, 4, 23, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ), /* 1960 */ new tagLunarCal( 45, 0, 6, 29, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ), new tagLunarCal( 35, 0, 0, 34, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), new tagLunarCal( 24, 4, 1, 39, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ), new tagLunarCal( 43, 0, 2, 44, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ), /* 1964 */ new tagLunarCal( 32, 0, 4, 50, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ), new tagLunarCal( 20, 3, 5, 55, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ), new tagLunarCal( 39, 0, 6, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0 ), new tagLunarCal( 29, 7, 0, 5, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ), /* 1968 */ new tagLunarCal( 47, 0, 2, 11, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ), new tagLunarCal( 36, 0, 3, 16, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0 ), new tagLunarCal( 26, 5, 4, 21, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1 ), new tagLunarCal( 45, 0, 5, 26, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ), /* 1972 */ new tagLunarCal( 33, 0, 0, 32, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1 ), new tagLunarCal( 22, 4, 1, 37, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ), new tagLunarCal( 41, 0, 2, 42, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1 ), new tagLunarCal( 30, 8, 3, 47, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ), /* 1976 */ new tagLunarCal( 48, 0, 5, 53, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1 ), new tagLunarCal( 37, 0, 6, 58, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ), new tagLunarCal( 27, 6, 0, 3, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0 ), new tagLunarCal( 46, 0, 1, 8, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0 ), /* 1980 */ new tagLunarCal( 35, 0, 3, 14, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1 ), new tagLunarCal( 24, 4, 4, 19, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1 ), new tagLunarCal( 43, 0, 5, 24, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1 ), new tagLunarCal( 32, 10, 6, 29, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1 ), /* 1984 */ new tagLunarCal( 50, 0, 1, 35, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0 ), new tagLunarCal( 39, 0, 2, 40, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1 ), new tagLunarCal( 28, 6, 3, 45, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0 ), new tagLunarCal( 47, 0, 4, 50, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), /* 1988 */ new tagLunarCal( 36, 0, 6, 56, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0 ), new tagLunarCal( 26, 5, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1 ), new tagLunarCal( 45, 0, 1, 6, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0 ), new tagLunarCal( 34, 0, 2, 11, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0 ), /* 1992 */ new tagLunarCal( 22, 3, 4, 17, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0 ), new tagLunarCal( 40, 0, 5, 22, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0 ), new tagLunarCal( 30, 8, 6, 27, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1 ), new tagLunarCal( 49, 0, 0, 32, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1 ), /* 1996 */ new tagLunarCal( 37, 0, 2, 38, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), new tagLunarCal( 27, 5, 3, 43, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1 ), new tagLunarCal( 46,  0, 4, 48, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ), /* 1999 */new tagLunarCal( 35,  0, 5, 53, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ), /* 2000 */new tagLunarCal( 23,  4, 0, 59, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 42,  0, 1,  4, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 31,  0, 2,  9, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ),new tagLunarCal( 21,  2, 3, 14, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ), /* 2004 */new tagLunarCal( 39,  0, 5, 20, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 28,  7, 6, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ),new tagLunarCal( 48,  0, 0, 30, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ),new tagLunarCal( 37,  0, 1, 35, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ), /* 2008 */new tagLunarCal( 25,  5, 3, 41, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),new tagLunarCal( 44,  0, 4, 46, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),new tagLunarCal( 33,  0, 5, 51, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 22,  4, 6, 56, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ), /* 2012 */new tagLunarCal( 40,  0, 1,  2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),new tagLunarCal( 30,  9, 2,  7, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 49,  0, 3, 12, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 38,  0, 4, 17, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ), /* 2016 */new tagLunarCal( 27,  6, 6, 23, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ),new tagLunarCal( 46,  0, 0, 28, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0 ),new tagLunarCal( 35,  0, 1, 33, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),new tagLunarCal( 24,  4, 2, 38, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ), /* 2020 */new tagLunarCal( 42,  0, 4, 44, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),new tagLunarCal( 31,  0, 5, 49, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ),new tagLunarCal( 21,  2, 6, 54, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),new tagLunarCal( 40,  0, 0, 59, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), /* 2024 */new tagLunarCal( 28,  6, 2,  5, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ),new tagLunarCal( 47,  0, 3, 10, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1 ),new tagLunarCal( 36,  0, 4, 15, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ),new tagLunarCal( 25,  5, 5, 20, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ), /* 2028 */new tagLunarCal( 43,  0, 0, 26, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ),new tagLunarCal( 32,  0, 1, 31, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0 ),new tagLunarCal( 22,  3, 2, 36, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ) ];SolarCal = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];SolarDays = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396,0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 397 ];AnimalIdx = ["棣� ", "缇� ", "鐚� ", "闆� ", "鐙� ", "璞� ", "榧� ", "鐗� ", "铏� ", "鍏� ", "榫� ", "铔� " ];LocationIdx = [ "鍗�", "鏉�", "鍖�", "瑗�" ];if (M==0) {  //闃冲巻鍒伴槾鍘�
if (!IsInteger(form_jisuan.yyear.value) || !IsInteger(form_jisuan.ymonth.value) || !IsInteger(form_jisuan.yday.value)) return alert("璇疯緭鍏ュ悎娉曢槼鍘嗗勾鏈堟棩鏁板€�");   SolarYear = parseInt(form_jisuan.yyear.value);SolarMonth = parseInt(form_jisuan.ymonth.value);SolarDate = parseInt(form_jisuan.yday.value);if ( SolarYear <= FIRSTYEAR || SolarYear > LASTYEAR ) return alert("璇疯緭鍏�1936-2031鏈夋晥骞翠唤"); sm = SolarMonth - 1;if ( sm < 0 || sm > 11 ) return alert(璇疯緭鍏ユ湁鏁堟湀浠�);leap = GetLeap( SolarYear );if ( sm == 1 )d = leap + 28;elsed = SolarCal[sm];if ( SolarDate < 1 || SolarDate > d ) return 3;y = SolarYear - FIRSTYEAR;acc = SolarDays[ leap*14 + sm ] + SolarDate;kc = acc + LunarCal[y].BaseKanChih;Kan = kc % 10;Chih = kc % 12;Location = LocationIdx[kc % 4];Age = kc % 60;if ( Age < 22 )Age = 22 - Age;elseAge = 82 - Age;Age =Age + 3;if (Age < 10)Age=Age+60;Animal = AnimalIdx[ Chih ];if ( acc <= LunarCal[y].BaseDays ) {y--;LunarYear = SolarYear - 1;leap = GetLeap( LunarYear );sm += 12;acc = SolarDays[leap*14 + sm] + SolarDate;}elseLunarYear = SolarYear;l1 = LunarCal[y].BaseDays;for ( i=0; i<13; i++ ) {l2 = l1 + LunarCal[y].MonthDays[i] + 29;if ( acc <= l2 ) break;l1 = l2;}LunarMonth = i + 1;LunarDate = acc - l1;im = LunarCal[y].Intercalation;if ( im != 0 && LunarMonth > im ) {LunarMonth--;if ( LunarMonth == im ) LunarMonth = -im;}if ( LunarMonth > 12 ) LunarMonth -= 12;//alert("鍐滃巻/闃村巻鏃ユ湡涓猴細"+ LunarYear + "骞�" + LunarMonth + "鏈� " + LunarDate + "鏃� " );var showgn = 0;showgn = "鍐滃巻鏃ユ湡涓猴細"+ LunarYear + "骞�" + LunarMonth + "鏈� " + LunarDate + "鏃� ";document.form_jisuan.g2n.value=showgn;//form_jisuan.yyear.value = "";//form_jisuan.ymonth.value = "";//form_jisuan.yday.value = ""; return 0;}else /* 闃村巻杞槼鍘� */ { if (!IsInteger(form_jisuan.nyear.value) || !IsInteger(form_jisuan.nmonth.value) || !IsInteger(form_jisuan.nday.value)) return alert("璇疯緭鍏ュ悎娉曞啘鍘嗗勾鏈堟棩鏁板€�");   LunarYear = parseInt(form_jisuan.nyear.value);LunarMonth = parseInt(form_jisuan.nmonth.value);LunarDate = parseInt(form_jisuan.nday.value);if ( LunarYear < FIRSTYEAR || LunarYear >= LASTYEAR ) return alert("璇疯緭鍏�1936-2031鏈夋晥骞翠唤");   y = LunarYear - FIRSTYEAR ; im = LunarCal[y].Intercalation; lm = LunarMonth; if ( lm < 0 ) { if ( lm != -im ) return alert(璇疯緭鍏ユ湁鏁堟湀浠�);   } else if ( lm < 1 || lm > 12 ) return alert(璇疯緭鍏ユ湁鏁堟湀浠�);   if ( im != 0 ) { if ( lm > im ) lm++; else if ( lm == -im ) lm = im + 1; } lm--; if ( LunarDate > LunarCal[y].MonthDays[lm] + 29 ) return alert("鍐滃巻鏃ユ湡涓嶆纭�");acc = 0;for ( i=0; i < lm;i++) {acc+= LunarCal[y].MonthDays[i] + 29;}acc +=LunarCal[y].BaseDays + LunarDate;leap = GetLeap( LunarYear ); for ( i=13; i>=0; i-- ) {if ( acc > SolarDays[leap*14+i] ) break; }       SolarDate = acc - SolarDays[leap*14 + i]  ;if ( i <= 11 ) { SolarYear = LunarYear; SolarMonth = i + 1; } else { SolarYear = LunarYear + 1; SolarMonth = i - 11; } leap = GetLeap( SolarYear ); y = SolarYear - FIRSTYEAR; //acc = SolarDays[leap][SolarMonth-1] + SolarDate; acc = SolarDays[leap*14 + SolarMonth-1] + SolarDate;weekday = ( acc + LunarCal[y].BaseWeekday ) % 7; kc = acc + LunarCal[y].BaseKanChih; kan = kc % 10; chih = kc % 12; //alert("鍏巻/闃冲巻鏃ユ湡涓猴細"+ SolarYear + "骞�" + SolarMonth + "鏈�" + SolarDate + "鏃� " );        var showng = 0;showng = "鍏巻鏃ユ湡涓猴細"+ SolarYear + "骞�" + SolarMonth + "鏈�" + SolarDate + "鏃� ";document.form_jisuan.n2g.value=showng;//form_jisuan.nyear.value = "";//form_jisuan.nmonth.value = "";//form_jisuan.nday.value = "";            return 0;}//else缁撴潫}/* 闂板勾, 杩斿洖 0 骞冲勾, 1 闂板勾 */
function GetLeap( year ){if ( year % 400 == 0 )return 1;else if ( year % 100 == 0 )return 0;else if ( year % 4 == 0 )return 1;elsereturn 0;}function tagLunarCal( d, i, w, k, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13) {this.BaseDays = d;this.Intercalation = i;this.BaseWeekday = w;this.BaseKanChih = k;this.MonthDays = [ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ]; /* 姝ゅ啘鍘嗗勾姣忔湀涔嬪ぇ灏�, 0==灏忔湀(29鏃�), 1==澶ф湀(30鏃�) */
}//--><!--
function OpenWin( url ) { return window.open( url, 'coop', 'width=320,height=350,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=1' ); 
} function IsInteger(string ,sign) 
{  var integer; if ((sign!=null) && (sign!='-') && (sign!='+')) { alert('IsInter(string,sign)鐨勫弬鏁板嚭閿欙細nsign涓簄ull鎴�"-"鎴�"+"'); return false; } integer = parseInt(string); if (isNaN(integer)) { return false; } else if (integer.toString().length==string.length) {  if ((sign==null) || (sign=='-' && integer<0) || (sign=='+' && integer>0)) { return true; } else return false;  } else return false; 
} //-->

 进制转换器

代码如下:

ss="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@";function v10toX(n,m){m=String(m).replace(/ /gi,"");if(m=="")return"";if(parseInt(m)!=m){M("鐠囩柉绶崗銉︽殻閺佸府绱�");return""}var t="";var a=ss.substr(0,n);while(m!=0){var b=m%n;t=a.charAt(b)+t;m=(m-b)/n}return t}function vXto10(n,m){m=String(m).replace(/ /gi,"");if(m=="")return"";var a=ss.substr(0,n);if(eval("m.replace(/["+a+"]/gi,'')")!=""){M("璇疯緭鍏�"+n+"杩涘埗鏁帮紒");return""}var t=0,c=1;for(var x=m.length-1;x>-1;x--){t+=c*(a.indexOf(m.charAt(x)));c*=n}return t}function vXtoY(n,m,y){a=vXto10(n*1,m);if(a=="")return"";a=v10toX(y,a);return a}function M(str){alert(str)}function convert(hex_input,id_input,hex_output,id_output){var input_v=document.getElementById(id_input).value;var outputEle=document.getElementById(id_output);var hex_in_v=document.getElementById(hex_input).value;var hex_out_v=document.getElementById(hex_output).value;outputEle.value=vXtoY(hex_in_v,input_v,hex_out_v)}function convert_c(hex_input_v,id_input,hex_output_v,id_output){var input_v=document.getElementById(id_input).value;var outputEle=document.getElementById(id_output);outputEle.value=vXtoY(hex_input_v,input_v,hex_output_v)}

有兴趣的同学可以一起看看。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://xiahunao.cn/news/1382237.html

如若内容造成侵权/违法违规/事实不符,请联系瞎胡闹网进行投诉反馈,一经查实,立即删除!

相关文章

Mysql:如果知道一个用户的出身日期,如何统计他的退休年龄是那一年

业务需求 今天获得一个统计报表的业务&#xff1a; 在一个企业用户表中&#xff08;详细字段不写&#xff09;&#xff0c;现需要统计所有员工的退休日期形成一个定时任务&#xff0c;在定时任务中&#xff0c;如果员工接近还有60天&#xff0c;定时任务会短信发名单给人事部。…

计算机领域男的多大年龄退休,2022年后男性几岁退休 2022退休时间表

近年来&#xff0c;有关于延迟退休的新闻报道&#xff0c;一直在不少。有一种说法是&#xff0c;在2022年以后&#xff0c;延迟退休政策将会出台&#xff0c;这对于近几年来&#xff0c;将要退休的人群来说&#xff0c;无疑是非常关心的&#xff0c;那么2022年后男性几岁退休&a…

计算机专业多大退休,60%仍在使用Windows 7的计算机下个月正式退休

实际上&#xff0c;计算机的普及发生在最近十年中。Microsoft Windows 7于2009年10月22日发布&#xff0c;距今天已经整整十年了。因此&#xff0c;许多人首先接触了Windows 7中的计算机。今天&#xff0c;这个伴随着许多人的操作系统即将完成其使命&#xff0c;并将于2020年1月…

退休人员计算工具

一&#xff0c;背景介绍 平时工作中需要计算退休年龄&#xff0c;分为公务员&#xff0c;参公&#xff0c;事业三类。 以前都是手工计算的&#xff0c;因为人会不断更新流动&#xff0c;每次需要这些数据的时候&#xff0c;都需要重新计算一遍。 这样存在几个问题&#xff1a; …

通达OA SQL注入漏洞【CVE-2023-4165】

通达OA SQL注入漏洞【CVE-2023-4165】 一、产品简介二、漏洞概述三、影响范围四、复现环境POC小龙POC检测工具: 五、修复建议 免责声明&#xff1a;请勿利用文章内的相关技术从事非法测试&#xff0c;由于传播、利用此文所提供的信息或者工具而造成的任何直接或者间接的后果及损…

百度地图标注公司那家好

目前传统的商业模式已经无法满足创业者的发展需求&#xff0c;想要有更好更快的发展可以通过网络来进行推广&#xff0c;腾讯地图标注这是一种全新的推广模式&#xff0c;现在每个人几乎都在用手机来进行。上网&#xff0c;在手机上下载各种各样的地图来寻找自己的目的地&#…

如何在UI自动化测试中加入REST API的操作

1、问题 当我们描述一个“好的自动化测试用例”时&#xff0c;经常出现标准是&#xff1a; 精确 自动化测试用例应该测试一件事&#xff0c;只有一件事。与测试用例无关的应用程序的某个部分中的错误不应导致测试用例失败。 独立 自动化测试用例不应该受测试套件中任何其他…

将QQ和微信的保存路径由C盘转移到其他盘

将QQ和微信的保存路径由C盘转移到其他盘 &#xff08;1&#xff09;QQ中的文件通过右键点击QQ头像——》选择系统设置——》选择文件管理——》选择更改目录 完成以后&#xff0c;需要重启一下QQ即可。 &#xff08;2&#xff09;右键点击微信——》选择设置——》选择文件…

pc版微信聊天记录备份迁移

1. 备份:定期备份文件夹 C:\Users\${username}\Documents\WeChat Files (${username}为微信安装的windows用户名) 2. 恢复&#xff1a; &#xff08;1&#xff09;. 新机器安装成功微信后先别启动 &#xff0c;将 备份的WeChat Files 文件夹复制到 C:\Users\${username}\Doc…

固态硬盘的合盘及数据转移

场景 1.在C盘空间不足时&#xff0c;我们会想到把其他的盘的数据分给C盘&#xff0c;这样就会涉及到数据转移的问题。 2.在硬盘分区合并的时候&#xff0c;有的两分区中间会有一个恢复分区&#xff0c;导致不能合并的情况。 解决 分盘 1.右键我的电脑&#xff0c;点击管理 …

6.2.0在线编辑:GrapeCity Documents for Word (GcWord) Crack

GrapeCity Word 文档 (GcWord) 支持 Office Math 函数以及转换为 MathML GcWord 现在支持在 Word 文档中创建和编辑 Office Math 内容。GcWord 中的 OMath 支持包括完整的 API&#xff0c;可处理科学、数学和通用 Word 文档中广泛使用的数学符号、公式和方程。以下是通过 OMa…

男宝宝起名的三大思路

男宝宝起名的三大思路 最近有个哥们正在为一件事情烦恼&#xff0c;开始的时候咱们都觉得挺奇怪的&#xff0c;这哥们现在可以说是家庭事业双丰收了&#xff0c;到底还有什么事儿能让他这么的烦恼呢?询问之下&#xff0c;这个哥们儿向我们吐了苦水&#xff0c;不为别的&#x…

九重鸿蒙浮屠塔,浮图塔测算(浮图塔黄历老黄历)

浮图塔是什么 // 浮图塔就是佛塔. ※浮图&#xff1a;梵语 1、佛陀(简称佛)的别名。 2、佛塔。亦作“佛图”、“浮屠”。 魏书˙卷一一四˙释老志&#xff1a;“自洛中构白马寺&#xff0c;盛 饰佛图&#xff0c;画迹甚妙&#xff0c;为四方式。 凡宫塔制度&#xff0c;犹依天竺…

关于阿里云服务器密码重置和使用方法

总是记不住密码&#xff0c;今天又重置了阿里云服务器的远程连接密码&#xff0c;在这里做个记录&#xff0c;方便以后查找。 一定注意&#xff0c;重置完实例密码要重启&#xff01; Windows 系统 默认的用户名为administrator 密码为重置密码 一定注意&#xff0c;重置完…

阿里云服务器密码重置

目录 一、进入阿里云官网管理控制台 二、选择重置实例密码​ 三、保存 四、网页远程连接服务器 一、进入阿里云官网管理控制台 首先进入阿里云官网&#xff0c;登录你的阿里云账号进入阿里云的管理控制台&#xff0c;然后进入ECS管理后台&#xff0c;如下图。 二、选择重置实例…

服务器密码忘记处理之二:重置密码

步骤1&#xff1a;进入BIOS。 不同的系统进入的方式不尽相同&#xff0c;我的环境是DELL服务器安装的Windows Server 2008 r2 Standard版&#xff0c;在重启的时候&#xff0c;一直按着delete键&#xff0c;进入BIOS。 步骤2&#xff1a;选择启动盘启动服务器。 步骤3&#…

重置目录服务还原模式(DSRM)密码

重置目录服务还原模式&#xff08;DSRM&#xff09;密码 重置操作命令说明 重置操作 命令说明 PS C:\Users\Administrator> ntdsutil C:\Windows\system32\ntdsutil.exe: Set DSRM Password 重置 DSRM 管理员密码: Reset Password on server NULL 请键入 DS 还原模式 Admin…

阿里云轻量服务器如何重置密码?

我们在开通阿里云轻量应用服务器的时候&#xff0c;是没有设置服务器密码的地方的&#xff0c;而且服务器也没有初始密码&#xff0c;所以就需要我们开通好轻量应用服务器后去重置下服务器密码&#xff0c;那么如何重置密码呢&#xff1f; 首先&#xff0c;打开轻量应用服务器…

腾讯云服务器如何修改和重置密码?

在上一篇我们介绍了如何购买腾讯云服务器,现在来讲讲购买服务器之后&#xff0c;如何重置和修改腾讯云服务器密码。步骤过程很简单&#xff0c;虽然我描述的有点详细。 【修改云服务器密码(Linux操作系统)】 远程连接 Linux 实例(实例就是你的服务器)时&#xff0c;提示用户名或…

mysql如何重置密码

1. 关闭MySQL服务 点击系统偏好设置->最下边点MySQL&#xff0c;在弹出页面中&#xff0c;关闭服务 2.打开终端 ① 进入mysql文件夹 cd /usr/local/mysql/bin 回车②获取权限 sudo su 回车&#xff0c;然后输入开机密码&#xff0c;回车③进入安全模式 ./m…