<script language="
javascript">
function get_date_different(){
var _date_1 = document.getElementById('date1').value.replace(/(^s*)|(s*$)/g,'');
var _date_2 = document.getElementById('date2').value.replace(/(^s*)|(s*$)/g,'');
_date_1 = new Date(_date_1);
_date_2 = new Date(_date_2);
var days= _date_2.getTime() - _date_1.getTime();
var time = parseInt(days / (1000 * 60 * 60 * 24));
document.getElementById('content').innerHTML = '两个日期相差 <strong style="color:red">'+time+'</strong> 天!';}
</script>