码迷,mamicode.com
首页 > 其他好文 > 详细

获取文本内容

时间:2017-07-14 18:45:39      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:input   class   delete   ted   function   find   公司   parent   eve   

方法一:
<td class="p-t-sm">
<a th:href="@{/home/footer/item/{footerNavId}(footerNavId=${footerNav.id})}"
class="text-muted"><p th:text="${footerNav.name}">关于中小型企业服务平台</p></a>
<input type="hidden" name="_csrf" th:value="${_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="@{/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();
});
}


获取文本内容

标签:input   class   delete   ted   function   find   公司   parent   eve   

原文地址:http://www.cnblogs.com/Wmmm/p/7171767.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!