原文链接:https://blog.csdn.net/weixin_42872192/article/details/105715019
var JsNum = function(num1,num2){ var Num = parseFloat(num1/num2); var result=""; var a = Math.floor(Num); //整数部分 var b = parseInt(num1%num2);//余数部分 result = a +";"+ b; //返回整数+";"+ 余数 return result; }