如何在使用<display:table>&amp; <display:column>时使表行可单击

时间:2016-01-27 09:06:58

标签: javascript html hyperlink clickable

<display:table class="table" name="regionList" id="elem"
        requestURI="./addCountry.html">
        <display:column property="name" title="Country" />
        <display:column property="code" title="City" />
        <display:column title="&nbsp;">
            <a href="QQQQ.html?id=<c:out value='${elem.id}' />">Edit</a>
        </display:column>
    </display:table>

如何将整个表格行可点击为链接?

1 个答案:

答案 0 :(得分:0)

这里有3个选项:

  1. 将het div包裹在锚内(不是最佳实践,我不认为seo喜欢它)
  2. $(".parentdiv").click(function() { window.location = $(this).data("http:///www.location.com"); });
  3. <div onclick="location.href='YOUR-URL-HERE';" style="cursor: pointer;"></div>