I have an issue that arises in IE8, but doesn’t occur in IE7 or in IE8 compatibility mode. In IE8 I can only raise a mouse click event when the mouse is over text in a table cell. If the mouse is over a blank area in the same cell, the mouse click event isn’t raised. The tables are dynamically generated. The browser is running in quirks mode.
我有一个问题出现在IE8中,但不会发生在IE7或IE8兼容模式。在IE8中,当鼠标悬停在表格单元格中的文本上时,我只能引发鼠标单击事件。如果鼠标位于同一单元格中的空白区域上,则不会引发鼠标单击事件。这些表是动态生成的。浏览器以怪癖模式运行。
The code works fine in all browsers. I was just wondering if you know of something with IE8 that would cause it to recognize the mouse click only when positioned over text in the cell and not the entire table cell. The table is fixed layout with specified width for each column.
该代码适用于所有浏览器。我只是想知道你是否知道IE8的某些东西会导致它仅在单元格中的文本上而不是整个表格单元格中识别鼠标时才会识别。该表是固定布局,每列具有指定的宽度。
1 个解决方案
#1
I found that this is because the bacakground of the cell is transparent. Try setting the background of the cell to a color.
Once I did, I got the clicks as expected...
我发现这是因为细胞的背景是透明的。尝试将单元格的背景设置为颜色。一旦我这样做,我按预期得到了点击次数......
#1
I found that this is because the bacakground of the cell is transparent. Try setting the background of the cell to a color.
Once I did, I got the clicks as expected...
我发现这是因为细胞的背景是透明的。尝试将单元格的背景设置为颜色。一旦我这样做,我按预期得到了点击次数......