简体   繁体   中英

How to make table row clickable while using <display:table> &<display:column>

<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>

How can I make the whole table row clickable as link?

There are 3 options here:

  1. Wrap het div's within anchor (Not best practice and i don't think seo likes it)
  2. $(".parentdiv").click(function() { window.location = $(this).data("http:///www.location.com"); });
  3. <div onclick="location.href='YOUR-URL-HERE';" style="cursor: pointer;"></div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM