<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
var nowdate = new Date();
var monthStartDay = new Date(nowdate.getFullYear(), nowdate.getMonth(), 1);
var monthEndDay = new Date(nowdate.getFullYear(), nowdate.getMonth() + 1, 0);
$(function() {
$("#StartDate").html(monthStartDay);
$("#EndDate").html(monthEndDay);
});
</script>
<style>
.color{
color:green;
}
</style>
</head>
<body>
<h1>get month start date and end date in javascript</h1>
<div>
Month StartDate :
<label id="StartDate" class="color"></label>
</div>
<div>
Month EndDate :
<label id="EndDate" class="color"></label>
</div>
</body>
</html>
// Add your javascript here
$(function(){
$("h1").animate({
"margin-left": "100px"
}, "slow");
});
/* Put your css in here */
h1 {
color: red;
}