1.
$("#pk_id").val().replace(/\s/gi, '');
2.
document.getElementById('txt_id').value=document.getElementById('txt_id').value.replace(/\s/gi,'');
1.
$("#pk_id").val().replace(/\s/gi, '');
2.
document.getElementById('txt_id').value=document.getElementById('txt_id').value.replace(/\s/gi,'');
转载于:https://www.cnblogs.com/lengv10/p/3810176.html