Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/365.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript IE8:表不';我不知道如何滚动_Javascript_Scroll_Html Table_Internet Explorer 8 - Fatal编程技术网

Javascript IE8:表不';我不知道如何滚动

Javascript IE8:表不';我不知道如何滚动,javascript,scroll,html-table,internet-explorer-8,Javascript,Scroll,Html Table,Internet Explorer 8,还有一个IE8的问题。谢谢你的建议 所以我有下表。基于用户输入的Javascript函数用几十个值填充tbody。Firefox和Chrome都会在这种情况下添加一个滚动条;然而,IE却没有,简单的桌子永远在继续,甚至打破了它的div 如何使IE8识别出发生了溢出 <div> <form> <table id="myTable" style="display: block; max-height: 300px;">

还有一个IE8的问题。谢谢你的建议

所以我有下表。基于用户输入的Javascript函数用几十个值填充tbody。Firefox和Chrome都会在这种情况下添加一个滚动条;然而,IE却没有,简单的桌子永远在继续,甚至打破了它的div

如何使IE8识别出发生了溢出

<div>
        <form>
        <table id="myTable" style="display: block; max-height: 300px;">
            <thead style="display: block; color: white; font-family: arial, helvetica, sans-serif; width: 796px; " > 
            <tr id=head> <B>
                <th style="width: 170px; text-align: center" >Location</th> 
                <th style="width: 70px; text-align: center">Year</th> 
                <th style="width: 520px; text-align: center" >Title</th>
                </B>
            </tr> 
            </thead>
            <tbody style="display: block; width: 796px; height: 280px; overflow: scroll; text-align: center;" > 
            </tbody>  
        </table>
        </form>
    </div>

位置
年
标题

您是否尝试过为表创建一个包含溢出属性的CSS类

.table{溢出:滚动;}


这在IE8中应该行得通。

遗憾的是,什么都没做。我认为这个问题与这个桌子最初没有人的事实有关。