js如何获取几个月后的日期
<div class="user_pop" id="user_pop" style="width:510px;">
<p class="til"><a href="javascript:;" class="close"></a> <span id="title"></span> </p>
<div class="main padd2 f14" >
<div class="border">
<p> 兑换: <select id="month" name="month">
<option value="1">一个月</option>
<option value="3">三个月</option>
<option value="6">半年</option>
<option value="12">一年</option>
</select>
</p>
<p> 扣除:<span class="txt_orange" id="credit">200</span> 积分</p>
<p class="bors">有效期:<span class="txt_orange" id="start_time">2012-12-13</span> 至 <span class="txt_orange" id="expiretime">2013-1-13</span></p>
</div>
<input type="button" class="save" value="确 定" />
</div>
</div>
<script src="js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
$('#month').change(function(){
var m = $(this).val();
var credit = 200;
$("#credit").html(credit * m);
var start_time = $('#start_time').html();
var expiretime = addmulMonth(start_time, m);
$("#expiretime").html(expiretime);
});
});
// n个月后
function addmulMonth(dtstr, n)
{
var s = dtstr.split("-");
var yy = parseInt(s[0]);
var mm = parseInt(s[1]) - 1;
var dd = parseInt(s[2]);
var dt = new Date(yy, mm, dd);
dt.setMonth(dt.getMonth() + n);
if ((dt.getYear() * 12 + dt.getMonth()) > (yy * 12 + mm + n)) {
dt = new Date(dt.getYear(),