[.js] 날짜
이달의 마지막날짜 구하기
혜화초보
2017. 9. 6. 16:58
<html> <head> </head> <script language="javascript" >
// 2016 , 2 값을 변수 처리 하면 됩니다. // 2016년 2월의 마지막 일자를 리턴. function exe(){ var lastDay = new Date( 2016 , 2 , 0); console.log(' lastDay: '+ lastDay ); } </script> <body > <div style=" height:200px ; padding-top:200px ; padding-left:200px " > <a href="javascript:exe();" > click </a> </div> </body> </html> |