String.prototype.trim = function() {
return (this.replace(/^\s+|\s+$/g,""));
}
//调用方法
function check(){
var fn = document.getElementById("fileName").value;
document.getElementById("fileName").value = fn.trim();
}
08-23
String.prototype.trim = function() {
return (this.replace(/^\s+|\s+$/g,""));
}
//调用方法
function check(){
var fn = document.getElementById("fileName").value;
document.getElementById("fileName").value = fn.trim();
}