我必须使我的html表垂直滚动.
我在tbody标签上使用了以下代码,但它对我不起作用
<tbody style="height: 100px; overflow: auto">
Run Code Online (Sandbox Code Playgroud) 如果患者已经分配了时间段然后使用jquery(客户端)使颜色变黄,请参见小提琴.在我的小提琴,如果我分配时隙第一次那么颜色为绿色,并配发下一时隙时,那么前一个时隙是灰色同一时间.我必须让它变黄.为此,我必须找到span标签表,并检查wheather包含文本或如果不包含文本,然后使它yellow.But即时在jquery.i搜索很多新的,但没有得到.我怎样才能做到这一点.
//这是按钮点击代码
$("#<%=btnSelect.ClientID%>").click(function () {
var cells = $('#tableAppointment tbody tr td:nth-child(3)');
var i = 0;
var topcell = false;
cells.each(function ()
{
var $cell = $(this);
if ($cell.hasClass('csstdhighlight'))
{
if (i == 0)
{
$cell.find('span').text(jQuery('#<%=txtPatientName.ClientID%>').val());
topcell = $cell;
}
else
{
$cell.remove();
}
i++;
}
});
if (topcell && i > 1) topcell.attr('rowspan', i);
$("#tableAppointment tr").each(function ()
{
$('td', this).each(function ()
{
var value = $(this).find("span").val();
if (!value)//i m chking like this
{
}
else
{ //make …Run Code Online (Sandbox Code Playgroud) 我有两个下拉菜单ddlCountry和ddlState和一个按钮Submit。
当ddlstate在更新面板中时。
在提交两个下拉按钮的值时,将它们存储在数据库中。
然后在Repeater Control中显示数据。(以HTML Table结构显示)ASPX CODE
<table id="tablelist" class="csstablelist" cellspacing="1" cellpadding="1">
<tr>
<td class="csstablelisttoptr">
ddlCountryID
</td>
<td class="csstablelisttoptr">
ddlCountryText
</td>
<td class="csstablelisttoptr">
ddlstateText
</td>
</tr>
<asp:Repeater ID="repeaterList" runat="server" OnItemDataBound="repeaterList_ItemDataBound">
<ItemTemplate>
<tr onclick="selectRow(this);">
<td class="csstablelisttd" style="display: none">
<asp:Label ID="ddlCountryID" runat="server" Text='<%#Eval("ddlCountryID")%>'></asp:Label>
</td>
<td class="csstablelisttd">
<asp:Label ID="ddlCountryText" runat="server" Text='<%#Eval("ddlCountryText")%>'></asp:Label>
</td>
<td class="csstablelisttd">
<asp:Label ID="ddlstateText" runat="server" Text='<%#Eval("ddlstateText")%>'></asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<asp:DropDownList ID="ddlCountry" runat="server" CssClass="csstextbox" Width="207px" AutoPostBack="true" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">
</asp:DropDownList>
<asp:UpdatePanel ID="updatePanelState" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlState " runat="server" CssClass="csstextbox" Width="177px">
</asp:DropDownList>
</ContentTemplate> …Run Code Online (Sandbox Code Playgroud) for (var i = 0; row = tableAppointment.rows[i]; i++) {
for (var j = 0; col = row.cells[j]; j++) {
//iterate through columns
//columns would be accessed using the "col" variable assigned in the for loop.
}
}
Run Code Online (Sandbox Code Playgroud)
如何遍历第三个单元格具有rowspan属性的每一行.
*
我得到的结果如下
PID 在这里重复,2行显示1名患者(约翰)
我必须为patient_name(约翰)只显示一行我必须为患者约翰显示一行,如果他在同一日期或任何其他日期有多次访问.
javascript ×3
jquery ×3
html ×2
asp.net ×1
c#-4.0 ×1
css ×1
database ×1
dopostback ×1
sql-server ×1