如何制作表格超链接的单元格 [英] how to make a cell of table hyperlink

查看:148
本文介绍了如何制作表格超链接的单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将整个表格单元格超链接到html而无需javascript或jquery?



我试图将href放入td标签本身,但至少在chrome 18中不起作用

 < td href ='http://www.mw.com/dictionary/'style =cursor:pointer > 


解决方案

试试这个:

HTML:

 < table width =200border =1class =table > 
< tr>
< td>< a href =#>& nbsp;< / a>< / td>
< td>& nbsp;< / td>
< td>& nbsp;< / td>
< / tr>
< / table>

CSS:

  .table a 
{
display:block;
text-decoration:none;
}

我希望它能正常工作。


How can entire table cell be hyperlinked in html without javascript or jquery?

I tried to put href in td tag itself but its not working at least in chrome 18

<td href='http://www.m-w.com/dictionary/' style="cursor:pointer">

解决方案

Try this:

HTML:

<table width="200" border="1" class="table">
    <tr>
        <td><a href="#">&nbsp;</a></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
</table>

CSS:

.table a
{
    display:block;
    text-decoration:none;
}

I hope it will work fine.

这篇关于如何制作表格超链接的单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆