1、JS中传递数值多大数值会变
var number = 00161213313254545433
turnToDetail(number);
function turnToDetail(queryNumber){
queryNumber != 00161213313254545433(true)
}
应将数值转换为字符串
var number = 00161213313254545433
turnToDetail('number');
function turnToDetail(queryNumber){
queryNumber == 00161213313254545433(true)
}
2、JS中传递数值时前置0会自动去除
var number = 00161213313254545433
turnToDetail(number);
function turnToDetail(queryNumber){
queryNumber == 161213313254 (true,前置0自动去除)
}
应将数值转换为字符串
var number = 00161213313254545433
turnToDetail('number');
function turnToDetail(queryNumber){
queryNumber == 00161213313254545433(true)
}