var size = document.getElementById("id名称").value;
size = size.replace(/\s/g, "");
$("id名称").value=size;
var size = document.getElementById("id名称").value;
size = size.replace(/\s/g, "");
$("id名称").value=size;