.trim() in javascript not working in IE

Posted by Jin Yong on Stack Overflow See other posts from Stack Overflow or by Jin Yong
Published on 2010-02-22T00:37:53Z Indexed on 2010/05/13 10:14 UTC
Read the original article Hit count: 176

Filed under:

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

© Stack Overflow or respective owner

Related posts about JavaScript