IE9 table has random rows which are offset at random columns

前端 未结 5 718
栀梦
栀梦 2020-12-04 18:27

I have a page of categories, when the user clicks one, the items under that category are loaded via a jQuery Ajax call, in a table, and stuck into an element just below the

5条回答
  •  甜味超标
    2020-12-04 18:52

    The problem seems to be with white spacing.

    I found this answer on http://social.msdn.microsoft.com/Forums/en-AU/iewebdevelopment/thread/28d78780-c95c-4c35-9695-237ebb912d90

    Replace the html you get from the AJAX call using a regular expression like this.

    var expr = new RegExp('>[ \t\r\n\v\f]*<', 'g');
    tableHtml = tableHtml.replace(expr, '><');
    

提交回复
热议问题