实战项目-小说网站开发过程中难点记录(1)
2022-10-24 15:56:58
183
{{single.collect_count}}

第一次一个人完成从前端到后台的整个项目开发,给公司开发一个小说网站。使用的技术是ssh2+jquery+bootstrap技术进行开发。从这篇开始,我将会记录我在项目开发过程中遇到的自己认为的难点问题,或许很多问题是小白问题,但是我应该勇敢的都列出来,记录在博客,也希望对其他人有所帮助。

这篇的问题是:jquery实现批量删除的功能。

1,全选与单选,jquery代码

// 全选 
$("#check_all,#duiqi").click(function() { 
$("input[name='deleteids[]']").prop("checked",this.checked); 
}); 
// 单选 
var subChk = $("input[name='deleteids[]']") 
subChk.click(function() { 
$("#check_all").prop("checked", subChk.length == subChk.filter(":checked").length ? true:false); 
}); 


回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}