Javascript 单击表中包含的选项,设置禁用的Twitter引导表的样式
我有一个使用bootstrap3表的页面。此表包含各种链接,但我希望它在选择选项时禁用表链接 我有这个工作,但我需要它的风格,使前端用户知道该表是禁用的 我的代码是:Javascript 单击表中包含的选项,设置禁用的Twitter引导表的样式,javascript,jquery,css,twitter-bootstrap-3,Javascript,Jquery,Css,Twitter Bootstrap 3,我有一个使用bootstrap3表的页面。此表包含各种链接,但我希望它在选择选项时禁用表链接 我有这个工作,但我需要它的风格,使前端用户知道该表是禁用的 我的代码是: <table class="table table-hover table-striped hidden-xs" id="clientListTable"> <tr> <th>
<table class="table table-hover table-striped hidden-xs" id="clientListTable">
<tr>
<th>
<a href="<%=Html.GenerateLoopBackUrl(true, new { ClientList_SortOn = cell.SortOn, ClientList_SortDirection = sortDirection })%>"><%=cell.Value%></a>
<%if (showFilterOption)
{ %>
<a href="#" id="<%:cell.ColumnIdentifier%>_link" class="noPdf">
<span class="glyphicon glyphicon-filter" id="<%:cell.ColumnIdentifier%>_img"></span>
</a>
<%--<img src="<%= filterIcon%>" alt="add filter" id="<%:cell.ColumnIdentifier%>_img" />--%>
<%}%>
</th>
</tr>
<tr>
<%
foreach (var cell in row.Cells)
{
if (cell.Hidden) { }
else {%><td onclick="return clickDisableFunction();"><%=cell.Value%></td><%}
}
%>
</tr>
正如我所说的那样,这是可以预期的,但是当用户单击一个链接时,他们看不到所有其他链接在重定向时都已被禁用
下面是问题表格的屏幕截图。
我所要做的就是使表格淡出,在链接上变成浅灰色。单击决定使用模式作为一个选项,效果很好
var clickedOnce = false;
function clickDisableFunction()
{
if (clickedOnce == true)
{
return false;
};
clickedOnce = true;
document.getElementById('clientListTable').setAttribute("disabled","true")
};