]
代碼如下:
// 日期
).datepicker({
changeYear: true,
changeMonth: true,
🎜> onClose: function(selectedDate) {
$('. gap-date').datepicker('option','minDate', ' 1m');
}
});
$ date').datepicker({
changeYear: true,
changeMonth: true,
(selectedDate) {
var y, m, d;
var arr = selectedDate.split('-');
> d = arr[2];
$( '.date').datepicker('option','maxDate', new Date(y, m, d));
}
});
});
});
<script>
var d = '2013-07-21';
var nd = d.replace(new RegExp('-', 'g'), ','); //替换全部
document.write(nd);
document.write('<br>');
var a = 'phper_yang';
var aa = a.replace('_','.');//替换一次
document.write(aa);
</script>