IE8 and JQuery's trim()

后端 未结 5 1231
醉梦人生
醉梦人生 2020-12-02 09:07

I am making use of trim() like so:

if($(\'#group_field\').val().trim()!=\'\'){

Where group_field is an input element of type t

5条回答
  •  时光说笑
    2020-12-02 09:36

    You should use $.trim, like this:

    if($.trim($('#group_field').val()) !='') {
        // ...
    }
    

提交回复
热议问题