javascript - 表格内容溢出页面

标签 javascript html css

我有一个 HTML 页面,我在其中嵌入了 SSRS 报告。该报告超出了页面,如下图所示: enter image description here

这是生成的表:

<table cellpadding="0" cellspacing="0" id="ctl00_MainContent_FiveYearReportViewer_fixedTable" style="table-layout:fixed;width:100%;height:100%;">
        <tbody><tr style="background-color:White;">
            <td style="display: none; width: 25%;"></td><td style="display: none; width: 6px;"></td><td style="width:100%;"></td>
        </tr><tr id="ParametersRowctl00_MainContent_FiveYearReportViewer" style="display:none;">
            <td colspan="3"></td>
        </tr><tr style="height:6px;font-size:2pt;display:none;">
            <td colspan="3" style="padding:0px;margin:0px;text-align:center;background-color:#ECE9D8;"><div id="ctl00_MainContent_FiveYearReportViewer_ToggleParam">
                <input type="image" name="ctl00$MainContent$FiveYearReportViewer$ToggleParam$img" id="ctl00_MainContent_FiveYearReportViewer_ToggleParam_img" title="Show / Hide Parameters" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.SplitterHorizCollapse.png" alt="Show / Hide Parameters" align="middle" onclick="void(0);" style="cursor:pointer;"><input type="hidden" name="ctl00$MainContent$FiveYearReportViewer$ToggleParam$store" id="ctl00_MainContent_FiveYearReportViewer_ToggleParam_store"><input type="hidden" name="ctl00$MainContent$FiveYearReportViewer$ToggleParam$collapse" id="ctl00_MainContent_FiveYearReportViewer_ToggleParam_collapse" value="false">
            </div></td>
        </tr><tr>
            <td colspan="3"><div id="ctl00_MainContent_FiveYearReportViewer_ctl05" style="font-family:Verdana;font-size:8pt;border-bottom:1px #CCCCCC Solid;background-color:White;background-image:url(/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=BackImage&amp;Version=11.0.3452.0&amp;Color=White&amp;Name=Microsoft.Reporting.WebForms.Icons.toolbar_bk.png);">
                <div style="padding-left:6px;">
                    <div class=" " style="display:inline-block;font-family:Verdana;font-size:8pt;vertical-align:top;">
                        <table cellpadding="0" cellspacing="0" style="display:inline;">
                            <tbody><tr>
                                <td height="28px"><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_First">
                                    <div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_First_ctl00" style="display: none; border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <table title="First Page">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$First$ctl00$ctl00" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_First_ctl00_ctl00" title="First Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.FirstPage.gif" alt="First Page" style="border-style:None;height:16px;width:16px;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$First$ctl00$ctl01" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_First_ctl00_ctl01" title="First Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.LastPage.gif" alt="First Page" style="border-style:None;height:16px;width:16px;display:none;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_First_ctl01" class="aspNetDisabled" disabled="disabled" style="border:1px transparent Solid;">
                                        <table title="First Page">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$First$ctl01$ctl00" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_First_ctl01_ctl00" title="First Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.FirstPageDisabled.gif" alt="First Page" style="border-style:None;height:16px;width:16px;cursor:default;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$First$ctl01$ctl01" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_First_ctl01_ctl01" title="First Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.LastPageDisabled.gif" alt="First Page" style="border-style:None;height:16px;width:16px;display:none;cursor:default;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div>
                                </div></td><td width="4px"></td><td height="28px"><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Previous">
                                    <div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Previous_ctl00" style="display: none; border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <table title="Previous Page">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Previous$ctl00$ctl00" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Previous_ctl00_ctl00" title="Previous Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.PrevPage.gif" alt="Previous Page" style="border-style:None;height:16px;width:16px;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Previous$ctl00$ctl01" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Previous_ctl00_ctl01" title="Previous Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.NextPage.gif" alt="Previous Page" style="border-style:None;height:16px;width:16px;display:none;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Previous_ctl01" class="aspNetDisabled" disabled="disabled" style="border:1px transparent Solid;">
                                        <table title="Previous Page">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Previous$ctl01$ctl00" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Previous_ctl01_ctl00" title="Previous Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.PrevPageDisabled.gif" alt="Previous Page" style="border-style:None;height:16px;width:16px;cursor:default;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Previous$ctl01$ctl01" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Previous_ctl01_ctl01" title="Previous Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.NextPageDisabled.gif" alt="Previous Page" style="border-style:None;height:16px;width:16px;display:none;cursor:default;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div>
                                </div></td><td width="4px"></td><td height="28px"><input name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$CurrentPage" type="text" maxlength="8" size="3" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_CurrentPage" title="Current Page" class="aspNetDisabled" style="font-family:Verdana;font-size:8pt;"></td><td width="4px"></td><td height="28px"><span style="font-family:Verdana;font-size:8pt;">of</span></td><td width="4px"></td><td height="28px"><span id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_TotalPages" style="font-family:Verdana;font-size:8pt;white-space:nowrap;">1</span></td><td width="4px"></td><td height="28px"><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Next">
                                    <div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Next_ctl00" style="border: 1px solid transparent; cursor: default; display: none; background-color: transparent;">
                                        <table title="Next Page">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Next$ctl00$ctl00" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Next_ctl00_ctl00" title="Next Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.NextPage.gif" alt="Next Page" style="border-style:None;height:16px;width:16px;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Next$ctl00$ctl01" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Next_ctl00_ctl01" title="Next Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.PrevPage.gif" alt="Next Page" style="border-style:None;height:16px;width:16px;display:none;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Next_ctl01" class="aspNetDisabled" disabled="disabled" style="border: 1px solid transparent;">
                                        <table title="Next Page">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Next$ctl01$ctl00" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Next_ctl01_ctl00" title="Next Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.NextPageDisabled.gif" alt="Next Page" style="border-style:None;height:16px;width:16px;cursor:default;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Next$ctl01$ctl01" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Next_ctl01_ctl01" title="Next Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.PrevPageDisabled.gif" alt="Next Page" style="border-style:None;height:16px;width:16px;display:none;cursor:default;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div>
                                </div></td><td width="4px"></td><td height="28px"><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Last">
                                    <div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Last_ctl00" style="border: 1px solid transparent; cursor: default; display: none; background-color: transparent;">
                                        <table title="Last Page">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Last$ctl00$ctl00" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Last_ctl00_ctl00" title="Last Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.LastPage.gif" alt="Last Page" style="border-style:None;height:16px;width:16px;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Last$ctl00$ctl01" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Last_ctl00_ctl01" title="Last Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.FirstPage.gif" alt="Last Page" style="border-style:None;height:16px;width:16px;display:none;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Last_ctl01" class="aspNetDisabled" disabled="disabled" style="border: 1px solid transparent;">
                                        <table title="Last Page">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Last$ctl01$ctl00" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Last_ctl01_ctl00" title="Last Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.LastPageDisabled.gif" alt="Last Page" style="border-style:None;height:16px;width:16px;cursor:default;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl00$Last$ctl01$ctl01" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl00_Last_ctl01_ctl01" title="Last Page" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.FirstPageDisabled.gif" alt="Last Page" style="border-style:None;height:16px;width:16px;display:none;cursor:default;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div>
                                </div></td>
                            </tr>
                        </tbody></table>
                    </div><table cellpadding="0" cellspacing="0" toolbarspacer="true" style="display:inline-block;width:20px;">
                        <tbody><tr>
                            <td></td>
                        </tr>
                    </tbody></table><div class=" " style="display:inline-block;font-family:Verdana;font-size:8pt;vertical-align:top;">
                        <table cellpadding="0" cellspacing="0" style="display:inline;">
                            <tbody><tr>
                                <td height="28px"><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl01_ctl00">
                                    <div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl01_ctl00_ctl00" style="display: none; border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <table title="Go back to the parent report">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl01$ctl00$ctl00$ctl00" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl01_ctl00_ctl00_ctl00" title="Go back to the parent report" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.BackEnabled.gif" alt="Go back to the parent report" style="border-style:None;height:16px;width:16px;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl01$ctl00$ctl00$ctl01" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl01_ctl00_ctl00_ctl01" title="Go back to the parent report" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.BackRTLEnabled.gif" alt="Go back to the parent report" style="border-style:None;height:16px;width:16px;display:none;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl01_ctl00_ctl01" class="aspNetDisabled" disabled="disabled" style="border:1px transparent Solid;">
                                        <table title="Go back to the parent report">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl01$ctl00$ctl01$ctl00" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl01_ctl00_ctl01_ctl00" title="Go back to the parent report" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.BackDisabled.gif" alt="Go back to the parent report" style="border-style:None;height:16px;width:16px;cursor:default;"><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl01$ctl00$ctl01$ctl01" disabled="disabled" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl01_ctl00_ctl01_ctl01" title="Go back to the parent report" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.BackRTLDisabled.gif" alt="Go back to the parent report" style="border-style:None;height:16px;width:16px;display:none;cursor:default;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div>
                                </div></td>
                            </tr>
                        </tbody></table>
                    </div><table cellpadding="0" cellspacing="0" toolbarspacer="true" style="display:inline-block;width:20px;">
                        <tbody><tr>
                            <td></td>
                        </tr>
                    </tbody></table><div class=" " style="display:inline-block;font-family:Verdana;font-size:8pt;vertical-align:top;">
                        <table cellpadding="0" cellspacing="0" style="display:inline;">
                            <tbody><tr>
                                <td height="28px"><input name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl03$ctl00" type="text" maxlength="255" size="10" id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl03_ctl00" title="Find Text in Report" class="aspNetDisabled" style="font-family:Verdana;font-size:8pt;"></td><td width="4px"></td><td height="28px"><a id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl03_ctl01" title="Find" href="#" style="font-family: Verdana; font-size: 8pt; color: gray; text-decoration: none; white-space: nowrap; cursor: default;">Find</a></td><td width="4px"></td><td height="28px"><span style="font-family:Verdana;font-size:8pt;">|</span></td><td width="4px"></td><td height="28px"><a id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl03_ctl03" title="Find Next" href="#" style="font-family: Verdana; font-size: 8pt; color: gray; text-decoration: none; white-space: nowrap; cursor: default;">Next</a></td>
                            </tr>
                        </tbody></table>
                    </div><table cellpadding="0" cellspacing="0" toolbarspacer="true" style="display:inline-block;width:20px;">
                        <tbody><tr>
                            <td></td>
                        </tr>
                    </tbody></table><div class=" " style="display:inline-block;font-family:Verdana;font-size:8pt;vertical-align:top;">
                        <table cellpadding="0" cellspacing="0" style="display:inline;">
                            <tbody><tr>
                                <td height="28px"><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl04_ctl00" style="font-family: Verdana; font-size: 8pt; border: 1px solid transparent; cursor: default; background-color: transparent;">
                                    <table id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl04_ctl00_Button" title="Export drop down menu">
                                        <tbody><tr>
                                            <td><a id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl04_ctl00_ButtonLink" title="Export drop down menu" alt="Export drop down menu" href="javascript:void(0)" style="text-decoration: none; cursor: pointer;"><img id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl04_ctl00_ButtonImg" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.Export.gif" alt="Export drop down menu" style="border-style:None;height:16px;width:16px;"><span style="width:5px;text-decoration:none;"> </span><img id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl04_ctl00_ButtonImgDown" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.ArrowDown.gif" alt="Export drop down menu" style="border-style:None;height:6px;width:7px;margin-bottom:5px;"></a></td>
                                        </tr>
                                    </tbody></table>
                                </div><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl04_ctl00_Menu" style="background-color:White;border:1px #336699 Solid;display:none;position:absolute;padding:1px;z-index:1;">
                                    <div style="border: 1px solid rgb(51, 102, 153); cursor: pointer; background-color: rgb(221, 238, 247);">
                                        <a title="XML file with report data" alt="XML file with report data" onclick="$find('ctl00_MainContent_FiveYearReportViewer').exportReport('XML');" href="javascript:void(0)" style="color: rgb(51, 102, 204); font-family: Verdana; font-size: 8pt; padding: 3px 8px 3px 32px; display: block; white-space: nowrap; text-decoration: none;">XML file with report data</a>
                                    </div><div style="border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <a title="CSV (comma delimited)" alt="CSV (comma delimited)" onclick="$find('ctl00_MainContent_FiveYearReportViewer').exportReport('CSV');" href="javascript:void(0)" style="color: rgb(51, 102, 204); font-family: Verdana; font-size: 8pt; padding: 3px 8px 3px 32px; display: block; white-space: nowrap; text-decoration: none;">CSV (comma delimited)</a>
                                    </div><div style="border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <a title="PDF" alt="PDF" onclick="$find('ctl00_MainContent_FiveYearReportViewer').exportReport('PDF');" href="javascript:void(0)" style="color: rgb(51, 102, 204); font-family: Verdana; font-size: 8pt; padding: 3px 8px 3px 32px; display: block; white-space: nowrap; text-decoration: none;">PDF</a>
                                    </div><div style="border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <a title="MHTML (web archive)" alt="MHTML (web archive)" onclick="$find('ctl00_MainContent_FiveYearReportViewer').exportReport('MHTML');" href="javascript:void(0)" style="color: rgb(51, 102, 204); font-family: Verdana; font-size: 8pt; padding: 3px 8px 3px 32px; display: block; white-space: nowrap; text-decoration: none;">MHTML (web archive)</a>
                                    </div><div style="border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <a title="Excel" alt="Excel" onclick="$find('ctl00_MainContent_FiveYearReportViewer').exportReport('EXCELOPENXML');" href="javascript:void(0)" style="color: rgb(51, 102, 204); font-family: Verdana; font-size: 8pt; padding: 3px 8px 3px 32px; display: block; white-space: nowrap; text-decoration: none;">Excel</a>
                                    </div><div style="border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <a title="TIFF file" alt="TIFF file" onclick="$find('ctl00_MainContent_FiveYearReportViewer').exportReport('IMAGE');" href="javascript:void(0)" style="color: rgb(51, 102, 204); font-family: Verdana; font-size: 8pt; padding: 3px 8px 3px 32px; display: block; white-space: nowrap; text-decoration: none;">TIFF file</a>
                                    </div><div style="border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <a title="Word" alt="Word" onclick="$find('ctl00_MainContent_FiveYearReportViewer').exportReport('WORDOPENXML');" href="javascript:void(0)" style="color: rgb(51, 102, 204); font-family: Verdana; font-size: 8pt; padding: 3px 8px 3px 32px; display: block; white-space: nowrap; text-decoration: none;">Word</a>
                                    </div>
                                <div style="position: absolute; z-index: -1; top: 0px; left: 0px; width: 26px; opacity: 0.05; background-color: black;"></div></div></td>
                            </tr>
                        </tbody></table>
                    </div><table cellpadding="0" cellspacing="0" toolbarspacer="true" style="display:inline-block;width:6px;">
                        <tbody><tr>
                            <td></td>
                        </tr>
                    </tbody></table><div class=" " style="display:inline-block;font-family:Verdana;font-size:8pt;vertical-align:top;">
                        <table cellpadding="0" cellspacing="0" style="display:inline;">
                            <tbody><tr>
                                <td height="28px"><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl05_ctl00">
                                    <div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl05_ctl00_ctl00" style="border: 1px solid transparent; cursor: default; background-color: transparent;">
                                        <table title="Refresh">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl05$ctl00$ctl00$ctl00" title="Refresh" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.Refresh.gif" alt="Refresh" style="border-style:None;height:16px;width:16px;"></td>
                                            </tr>
                                        </tbody></table>
                                    </div><div id="ctl00_MainContent_FiveYearReportViewer_ctl05_ctl05_ctl00_ctl01" class="aspNetDisabled" disabled="disabled" style="border: 1px solid transparent; display: none;">
                                        <table title="Refresh">
                                            <tbody><tr>
                                                <td><input type="image" name="ctl00$MainContent$FiveYearReportViewer$ctl05$ctl05$ctl00$ctl01$ctl00" disabled="disabled" title="Refresh" src="/BlockGrantV2WebSite/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.RefreshDisabled.gif" alt="Refresh" style="border-style:None;height:16px;width:16px;cursor:default;"></td>
                                            </tr>
                                        </tbody></table>

如何更正此问题,以便页眉在表格展开时也变大?是否有任何我可以初始设置或在页面加载后通过 javascript 调用它的 css 属性?

最佳答案

原来这是由于我使用了另一个 SSRS 问题的变通方法引起的: SSRS 2008 R2 - SSRS 2012 - ReportViewer: Reports are blank in Safari and Chrome

将属性更改为 element.style.overflow = "scroll"; 为我解决了这个问题。

关于javascript - 表格内容溢出页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31461194/

相关文章:

html - 带有错误文本的 Bootstrap 表单

html - 使子元素在一个方向上比父元素宽

javascript - Jquery 实时验证

html - 隐藏的输入字段会影响 SEO 吗?

html - 如果我在一个元素上有 2 个属性,将显示哪一个?

css - 为什么这个 CSS 过渡队列?

css - Sass 中的这个错误是什么意思? "Illegal nesting: Only properties may be nested beneath properties."

javascript - 如何检查是否选择了表单选择以提交表单?

javascript - 表单提交两次(ajax 和 jquery)

javascript - 在AngularJS中设置不同的子路由