简体   繁体   English

单击链接时如何突出显示一行

[英]how to highligting a row when link is clicked

<h:dataTable border="1" value="#{InstallerHome.lstMyWork}"
                var="jobsCases" width="100%" id="results" headerClass="tableHeader"
                styleClass="stripe">
                <h:column>
                    <f:facet name="header">
                        <h:commandLink value="Last Name"
                            action="#{InstallerHome.workSort}" style="color: black; ">
                            <f:param name="SortOrderBy" value="clientLastName"></f:param>
                            <f:param name="IsAscending"
                                value="#{(InstallerHome.isAscending == 'true') ? 'false' : 'true' }"></f:param>
                        </h:commandLink>
                    </f:facet>
                    <h:outputText value="#{jobsCases.clientLastName}" />
            </h:column>

In this I want to highlight the row when link is clicked which is having value LastName.在此,我想在单击链接时突出​​显示具有 LastName 值的行。

Give an id property which you want to highlight, and for the element that needs to be clicked:给出一个要突出显示的id属性,以及需要单击的元素:

onclick="document.getElementById('theID').select();
document.getElementById('theID').setSelectionRange(0, 99999999);"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 数据表行不高亮 - datatable row not highligting 单击链接时增加特定行的值? - Increment a value of a specific row when a link is clicked? 单击时如何动态更改表单元格中的链接值时表格行的背景色 - how to dynamically change a table row background color when a link value within its cell changes when clicked 连续两次单击触发链接时,如何防止click事件执行相同的查询 - How can I prevent a click event from executing the same query when the triggering link is clicked twice in a row 如何为数据库中找到的每一行/记录生成一个链接,以便在单击时用作填充表单的方法? - How to generate a link for every row/record found in a database to use as a way to populate a form when clicked on? 单击时使 jQuery 数据表行成为 asp-action 链接 - Make jQuery datatable row an asp-action link when clicked 单击时将表格行重定向到链接 - Make a Table Row redirect to a link when it's clicked 如何存储/访问表(el-table)中的特定行数据并在单击该行中的链接时在对话框中显示(不是警报)? - How to store/access the specific row data in a table (el-table) and display that in an dialog box (not alert) when clicked on a link in that row? 单击链接时使用 javascript 获取表行的内容 - Fetch the contents of a table row using javascript when a link is clicked Go 在表格内单击时指向链接。带有 onClick 的行 - Go to a link when clicked inside a Table.Row with onClick
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM