如何用一张两行的表格和右边的另一张两行的表格编写html [英] How to write html with one table with two rows and on the right another table with two rows
本文介绍了如何用一张两行的表格和右边的另一张两行的表格编写html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi everyone!
我需要在一个表中有两行,并且在该表的右边(不在下面),还有另一行有两行.
I need to have two rows within one table and right of that table (not below) , another table with two rows.
此外,我希望能够在这些行中隐藏div.据我了解,列中不能包含div.
Furthermore i want to be able to hide the div within those rows. As i understand you can't have div inside a column.
如何隐藏创建这些表,然后根据条件隐藏单元格中的div?
How can i hide create those tables and then hide based on condition a div inside a cell?
就我而言,我使用了它,但是我无法用jQuery隐藏div,因为它是其中的一部分
In my case i used this but i can't hide the div with jquery because it is part
document.getElementById('managerLeaveRequestID').style.display = "none";
document.getElementById('settingsID').style.display = "none";
<div>
<table style="width:100%">
<tr>
<td>
<p>
<asp:HyperLink runat="server"
NavigateUrl="JavaScript:window.location = _spPageContextInfo.webAbsoluteUrl + '/Lists/LeaveRequest/NewForm.aspx?Source=' + _spPageContextInfo.webAbsoluteUrl + '/Pages/Default.aspx';"
Text="Submit a new leave request" ImageUrl="../Images/Submit.png" />
</p>
<div id="settingsID">
<p>
<asp:HyperLink runat="server"
NavigateUrl="JavaScript:window.location = _spPageContextInfo.webAbsoluteUrl + '/Pages/Settings.aspx';"
Text="Settings" ImageUrl="../Images/Settings.png"/>
</p>
</div>
</td>
<td>
<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="myLeaveRequestID" Title="loc:full" />
<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="managerLeaveRequestID" Title="loc:full" />
</td>
</tr>
</table>
</div>
推荐答案
我创建了一个Web部件页面,这是我的测试结果.
<div>
<table style="width:100%">
<tr>
<td>
<p>
<asp:HyperLink runat="server"
NavigateUrl="JavaScript:window.location = _spPageContextInfo.webAbsoluteUrl + '/Lists/LeaveRequest/NewForm.aspx?Source=' + _spPageContextInfo.webAbsoluteUrl + '/Pages/Default.aspx';"
Text="Submit a new leave request" ImageUrl="../Images/Submit.png" />
</p>
<div id="settingsID">
<p>
settingsID:
<asp:HyperLink runat="server"
NavigateUrl="JavaScript:window.location = _spPageContextInfo.webAbsoluteUrl + '/Pages/Settings.aspx';"
Text="Settings" ImageUrl="../Images/Settings.png"/>
</p>
</div>
</td>
<td>
<!--you can use table here also.
<table><tr><td></td></tr></table>-->
<div id="myLeaveRequestID">
zone_myLeaveRequestID:
<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="zone_myLeaveRequestID" Title="loc:full">
<zonetemplate>
</zonetemplate>
</WebPartPages:WebPartZone>
</div>
<div id="managerLeaveRequestID">
zone_managerLeaveRequestID:
<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="zone_managerLeaveRequestID" Title="loc:full">
<zonetemplate>
</zonetemplate>
</WebPartPages:WebPartZone>
</div>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
document.getElementById('managerLeaveRequestID').style.display = "none";
document.getElementById('settingsID').style.display = "none";
</script>
如果您日后需要帮助,能否提供您所需的详细信息.
最好的问候,
Lee
这篇关于如何用一张两行的表格和右边的另一张两行的表格编写html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文