我像这样使用 trim() :
if($('#group_field').val().trim()!=''){
其中 group_field
是文本类型的输入元素。这在 Firefox 中有效,但当我在 IE8 上尝试时,它给了我这个错误:
Message: Object doesn't support this property or method
当我删除 trim() 时,它在 IE8 上工作正常。我认为我使用 trim() 的方式是正确的?
感谢大家的帮助
最佳答案
关于jquery - IE8 和 JQuery 的 trim(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3439316/