onclick标签使用方法如下
<div class="product-item" th:onclick="'javascript:openUserRoom(\''+${obj.userid}+'\')'">
href标签使用方法如下
<a th:case="'C01'" th:href="@{'/app/tochat?userAccount='+${appUser.userAccount}}">
本文详细介绍了HTML中onclick和href属性的具体使用方法,包括如何通过onclick触发JavaScript函数以及如何使用href设置链接的目标地址。这对于前端开发者理解和应用网页交互元素至关重要。
onclick标签使用方法如下
<div class="product-item" th:onclick="'javascript:openUserRoom(\''+${obj.userid}+'\')'">
href标签使用方法如下
<a th:case="'C01'" th:href="@{'/app/tochat?userAccount='+${appUser.userAccount}}">
2203
3475
1804