var d_long; 变量 d_lat;
a = "37.333941,-121.879065";
var comma = a.search(",");
d_lat = a.slice(0,comma);
d_long = a.slice(comma+1,-1);
Math.floor(d_lat);
Math.floor(d_long);
alert(d_lat + " " + d_long);
var x = d_lat+d_long;
alert(x);
谢谢大家,我明白我做错了什么。我会尝试拆分而不是我奇怪的拼接。我想我会使用 d_lat = Number(d_lat);