说明:秒部分不计算
var startTime="08:31:00";
var endTime="09:31:00";
timeDifference(startTime,endTime);
//计算时间差(相差分钟)
function timeDifference(startTime,endTime){
var start1=startTime.split(":");
var startAll=parseInt(start1[0]*60)+parseInt(start1[1]);
var end1=endTime.split(":");
var endAll=parseInt(end1[0]*60)+parseInt(end1[1]);
console.log("时间差==="+(endAll-startAll));
}