.trim() Not Working in ie [duplicate]
Pos开发者_开发问答sible Duplicate:
.trim() in JavaScript not working in IE
Is there any way to make .trim() work in Internet Explorer 6.
Does this thread help you to make it work ? : .trim() in JavaScript not working in IE
At the end, look the message from kaichanvong regarding IE6
make a custom function trim() for yourself
if (typeof String.prototype.trim !== 'function') {
String.prototype.trim = function(s) {
return s.replace(/^\s+|\s+$/g, "");
}
}
精彩评论