首页 > 代码库 > 获取文本内容
获取文本内容
方法一:
<td class="p-t-sm">
<a th:href="http://www.mamicode.com/@{/home/footer/item/{footerNavId}(footerNavId=${footerNav.id})}"
class="text-muted"><p th:text="${footerNav.name}">关于中小型企业服务平台</p></a>
<input type="hidden" name="_csrf" th:value="http://www.mamicode.com/${_csrf.token}">
<input type="hidden" id="footerNavDeleteName">
</td>
<div class="modal-body">
<p class="text-muted p-v-xl" id="showText">您确定要删除<span>该二级菜单</span>?删除后将不可恢复。</p>
</div>
function addFooterNavDeleteEvent() {
$(".deleteFooterNavBtn").unbind(‘click‘).click(function () {
footerNavId = $(this).data("id");
footerNavName = $(this).data("name");
$("#showText span").text("");
$("#footerNavDeleteModal #footerNavDeleteName").val(footerNavName);
$("#showText span").append(footerNavName);
$("#footerNavDeleteModal").modal(‘show‘);
});
}
方法二:
<tr th:each="subServiceType,row : ${serviceType.subServiceTypes}">
<td class="p-t-sm">
<a th:href="http://www.mamicode.com/@{/services/manage?subServiceTypeId={subServiceTypeId}(subServiceTypeId=${subServiceType.id})}"
class="text-muted">
<p th:text="${subServiceType.name}">商贸公司注册</p>
</a>
</td>
<td>
<button class="btn btn-link sub-service-edit" type="button"
th:attr="data-id=${subServiceType.id}">
<i class="fa fa-pencil text-muted text-md"></i>
</button>
<button class="btn btn-link sub-service-delete" type="button"
th:attr="data-id=${subServiceType.id}">
<i class="fa fa-trash text-muted text-md"></i>
</button>
</td>
</tr>
<div class="modal-body">
<p class="text-muted p-v-xl" id="deleteCompany">您确定要删除“<span>商贸公司注册</span>”服务?删除后将不可恢复。</p>
</div>
function addSubServiceDeleteEvent() {
$(‘.sub-service-delete‘).unbind(‘click‘).click(function () {
subServiceIdDelete = $(this).data(‘id‘);
var companyName = $(this).parents(‘tr‘).find(‘p‘).text();
$(‘#deleteCompany span‘).text(companyName);
$(‘#deleteMenu‘).modal();
});
}
获取文本内容
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。