loopStatus : ${pageInfo?.list}" td id=‘number0‘ th:if="${fla
标签:
<tbody th:if="${pageInfo?.list}"><tr th:each="groupList,loopStatus : ${pageInfo?.list}">
<td id=‘number0‘ th:if="${flag}==0" th:each="group,loopStatus : ${groupList}" >
<label th:text="${group?.phoneNo}"></label>
<a id=‘edit0‘ href="http://www.mamicode.com/javaScript:void(0);"
th:data-phoneId="${group?.Id}"
th:data-dataUserId="${group?.dataUserId}"
th:onclick="groupAdd.showModify([[${group.phoneNo}]],this.getAttribute(‘data-phoneId‘),this.getAttribute(‘data-dataUserId‘))">
编纂
</a>
<a id=‘delete0‘ href="http://www.mamicode.com/javaScript:void(0);"
th:data-phoneId="${group?.Id}"
th:data-dataUserId="${group?.dataUserId}"
th:onclick="groupAdd.deletePhone([[${group.phoneNo}]],this.getAttribute(‘data-phoneId‘),this.getAttribute(‘data-dataUserId‘))">
删除
</a>
</td>
</tr>
</tbody>
1.有th标签时,可以用this.getAttribute(‘data-phoneId‘)方法,此中data-phoneId为页面颠末th界说的参数;
2.不用th标签时,可以用[[${group.phoneNo}]]方法,,通过双重中括号,直接获取group东西里的phoneNo.
html页面挪用js要领时的两种传参方法
温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/31624.html