.trim() in javascript not working in IE
- by Jin Yong
I tired to apply .trim() in javascript for one of my code. it's working fine under mozilla, but error display once I tried in IE8, does anyone know what is going on here? anyway I can make it work in IE?
code:
var ID = document.getElementByID('rep_id').value.trim();
error display:
Message: Object doesn't support this property or method
Line: 604
Char: 2
Code: 0
URI: http://test.localhost/test.js