通过html和wordpress函数使表中的一行完全可点击
Making a row in a table fully clickable via html and wordpress functions
所以我试图使行在表中完全可点击。有什么特别的原因,为什么第一行没有使整个行成为一个链接?如果你看到问题,请告诉我。
<tr onclick="DoNav('https://www.math.wisc.edu/undergraduate/mathlab');">
<td align ="center" >
<div id ="org_logo"> <img src =""width = "150"; </div>
Math Lab
</td>
<td>
Math 101, 112, 113, 114, 141, 171, 211, 213, 221, 222, 234, 240
</td>
<td>
Mathlab is a free, drop-in tutorial program of the Department of Mathematics. It is primarily staffed by Mathematics Department teaching assistants. Mathlab is open both in the fall and spring semesters of each academic year, but is closed during the summer sessions. In Mathlab, students work together with other students in the same course. Mathlab assistants help with one or two homework problems at a time, or with key examples from the text. </td>
</tr>
DoNav是一个PHP函数,它位于服务器端。你不能从onclick调用它。相反,使用JavaScript将文档位置设置为目标。
您可能应该使用CSS来格式化表格,而不是align="center",并使用下划线向用户表明行是链接,但是,无论如何,下面的代码都可以工作:
<table>
<tr onclick="document.location='https://www.math.wisc.edu/undergraduate/mathlab';">
<td align="center" >
<div id ="org_logo"><img src ="" width = "150" alt="Math Lab Logo"></div>
Math Lab
</td>
<td>
Math 101, 112, 113, 114, 141, 171, 211, 213, 221, 222, 234, 240
</td>
<td>
Mathlab is a free, drop-in tutorial program of the Department of Mathematics. It is primarily staffed by Mathematics Department teaching assistants. Mathlab is open both in the fall and spring semesters of each academic year, but is closed during the summer sessions. In Mathlab, students work together with other students in the same course. Mathlab assistants help with one or two homework problems at a time, or with key examples from the text.
</td>
</tr>
</table>
相关文章:
- 在wordpress一定时间后更改自定义字段
- 拆分文本以每隔n个字符添加一行新行,并注意空格
- 动态插入的表:JQuery未检测到最后一行
- 如何使MailHandler.php在Wordpress中工作
- 在终端中运行 JavaScript 时(使用 rhino),如何使用 print() 函数在一行中打印
- Wordpress插件根据需要加载js和css
- 如何在Angular UI网格中选择下一行
- 无法再创建Wordpress页面
- Wordpress中带有JQuery Accordion的未定义匿名函数
- 通过单击动态加载的表中同一行的另一个字段来更新一行的字段
- 注意:wp_enqueue_script调用不正确.在 Wordpress 调试模式下
- Ajaxify Wordpress网站与社交插件
- 将js添加到wordpress中以突出显示css活动菜单
- Wordpress:替换源(域名)链接
- Wordpress中的Javascript出现匿名函数/引用错误
- 如何在WordPress的头中加载自定义jQuery
- 鼠标光标-用于wordpress网站
- .load ajax无法正常工作whitin wordpress主题
- 一行JS代码在Wordpress中被破坏了.不知道为什么
- 通过html和wordpress函数使表中的一行完全可点击