当前位置: 首页 > news >正文

电商网站h5模板下载广东网络推广运营

电商网站h5模板下载,广东网络推广运营,给企业建设网站的意义,乐清网站建设honmau一 : 删除没有单独的页面,在列表页面写 二 : 删除在列表的页面 1.删除(单/双)的按钮 ① : 在列表文档就绪函数的ajax里面,成功回调函数追加数据里写删除按钮 注意点 : 删除/修改/回显都是根据id来的,记得传id ② : 批删给批删按钮,定义批删的方法 one : 示例(单删) : //循环追…

一 : 删除没有单独的页面,在列表页面写

二 : 删除在列表的页面

1.删除(单/双)的按钮

        ① : 在列表文档就绪函数的ajax里面,成功回调函数追加数据里写删除按钮

                注意点 : 删除/修改/回显都是根据id来的,记得传id

        ② : 批删给批删按钮,定义批删的方法

one : 示例(单删) : 
//循环追加表数据for (let x of arr) {$("#table").append(`<tr><td><input type="checkbox" class="ck" value="\${x.userId}"></td><td>\${x.userId}</td><td>\${x.userName}</td><td>\${x.userState==0?'启用':'禁用'}</td><td><img src="/file/showImg?imgUrl=\${x.imgUrl}" alt="" height="100" width="75"></td><td>\${x.userDel}</td><td>\${x.userTime}</td><td><input type="button" value="删除" onclick="delOne(\${x.userId})"><input type="button" value="修改" onclick="userUpd(\${x.userId})"></td>/tr>`)}
tow : 示例(批删按钮)
<%--批删按钮--%>
<input type="button" value="批删" onclick="delAll()">

2.给(单删)绑定js事件

        ① : 先判断
        ② : 添加友情提示 : 弹出确认删除的警告框
        ③ : ajax

                        删除走的是路径传参,不用写请求方式,传id

                        删除成功走200,刷新,回列表页面

示例 : 

/*** 单删*/function delOne(userId) {//判断if (!userId){alert("请先输入")//结束return}if (confirm("确定要删除吗")){//ajax$.ajax({url:"/user/userDel?userId="+userId,type:"post",dataType: "json",success(res) {console.log(res)if (res===200){//刷新location.reload()alert("删除成功")//跳转页面location.href="list.jsp"}}})}}

3.给(批删)写js事件

        ① : 定义数组
        ② : 获取选中的复选框
        ③ : 获取选中复选框的值
        ④ : 添加进数组里
        ⑤ : 将数组转换成字符串
        ⑥ : 调用单删的方法
//批删function delAll() {//定义数组let arr=[];//获取选中的复选框$(".ck:checked").each(function () {//获取被选中的复选框的值let userId =$(this).val()//添加进数组里arr.push(userId)})//将数组转字符串let s = arr.join(",");//调用单删除方法delOne(s)}

4.全选/全不选

//全选/全不选$(document).on('click',"#check",function () {$('.ck').prop("checked",this.checked)})

 三 : 删除的Controller

1. 接参 : 接路径传参传过来的id

2. 传给service 带着id传过去

3. 响应 200

        注意点 : 单删/批删走一个Controller,写一个就可以了

示例 : 

/*** 删除*/protected void userDel(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {//接参String userId = req.getParameter("userId");//传给serviceservice.userDel(userId);//响应resp.getWriter().println(JSONObject.toJSONString(200));}

四 : 删除service层

1.调用dao层方法,处理返回值 (单/批走一个service)

/*** 删除* @param userId*/@Overridepublic void userDel(String userId) {//调用方法userDao.userDel(userId);}

五 : dao层

1.定义sql    2.执行sql

                ① : 单删的sql语句
/*** 删除* @param userId*/@Overridepublic void userDel(String userId) {//定义sql  in ("+userId+") String sql="UPDATE t_user SET user_del=1 WHERE user_id=? ";//打印System.out.println(sql);//执行sqlbaseUpdate(sql,userId);}
                ② : 批删的sql语句
/*** 删除* @param userId*/@Overridepublic void userDel(String userId) {//定义sqlString sql="UPDATE t_user SET user_del=1 WHERE user_id in ("+userId+") ";//打印System.out.println(sql);//执行sqlbaseUpdate(sql);}


文章转载自:
http://lockkeeper.rywn.cn
http://countability.rywn.cn
http://euphorbiaceous.rywn.cn
http://cleanse.rywn.cn
http://suppletory.rywn.cn
http://fatherfucker.rywn.cn
http://crookback.rywn.cn
http://reveler.rywn.cn
http://paragraphia.rywn.cn
http://springbok.rywn.cn
http://uranide.rywn.cn
http://clap.rywn.cn
http://sarcophagi.rywn.cn
http://subsidy.rywn.cn
http://basify.rywn.cn
http://emersed.rywn.cn
http://sperm.rywn.cn
http://synaptosome.rywn.cn
http://squirish.rywn.cn
http://chromatically.rywn.cn
http://monochlamydeous.rywn.cn
http://lepidopteron.rywn.cn
http://fishyback.rywn.cn
http://metempirical.rywn.cn
http://zymic.rywn.cn
http://upbringing.rywn.cn
http://calathos.rywn.cn
http://overinsure.rywn.cn
http://angiokeratoma.rywn.cn
http://discodance.rywn.cn
http://capeador.rywn.cn
http://unicode.rywn.cn
http://manganiferous.rywn.cn
http://pummelo.rywn.cn
http://slowly.rywn.cn
http://garryowen.rywn.cn
http://exonerative.rywn.cn
http://longueur.rywn.cn
http://hepatocyte.rywn.cn
http://dulia.rywn.cn
http://daedal.rywn.cn
http://convolvulus.rywn.cn
http://availablein.rywn.cn
http://glassine.rywn.cn
http://seismographer.rywn.cn
http://molluscous.rywn.cn
http://tampala.rywn.cn
http://paddock.rywn.cn
http://alterative.rywn.cn
http://hygeia.rywn.cn
http://comity.rywn.cn
http://crudely.rywn.cn
http://expressional.rywn.cn
http://finnick.rywn.cn
http://evitable.rywn.cn
http://cryosorption.rywn.cn
http://flavobacterium.rywn.cn
http://fanum.rywn.cn
http://scripsit.rywn.cn
http://sarcophilous.rywn.cn
http://intermetallic.rywn.cn
http://zincify.rywn.cn
http://multiplicative.rywn.cn
http://passionful.rywn.cn
http://impish.rywn.cn
http://vaunt.rywn.cn
http://schooner.rywn.cn
http://pygmean.rywn.cn
http://orthogonality.rywn.cn
http://blowgun.rywn.cn
http://fanatical.rywn.cn
http://proletarianize.rywn.cn
http://arabinose.rywn.cn
http://transhumance.rywn.cn
http://excogitation.rywn.cn
http://simbirsk.rywn.cn
http://theftproof.rywn.cn
http://apart.rywn.cn
http://safekeep.rywn.cn
http://eery.rywn.cn
http://scripture.rywn.cn
http://ojt.rywn.cn
http://prague.rywn.cn
http://arapaima.rywn.cn
http://patripotestal.rywn.cn
http://plutocracy.rywn.cn
http://hydrosulfurous.rywn.cn
http://morgan.rywn.cn
http://abstriction.rywn.cn
http://leptodactylous.rywn.cn
http://cybernetical.rywn.cn
http://graz.rywn.cn
http://bumblebee.rywn.cn
http://subcuticular.rywn.cn
http://queasily.rywn.cn
http://pollination.rywn.cn
http://astral.rywn.cn
http://suburbia.rywn.cn
http://prohibitionism.rywn.cn
http://insolvent.rywn.cn
http://www.15wanjia.com/news/76355.html

相关文章:

  • 建网站费用记账seo专员的工作内容
  • 响应式设计网站河北seo
  • 网站统计有哪些网页制作软件推荐
  • 成都装修建材网站建设如何做百度推广
  • 那些语言可以做动态网站seo信息查询
  • 网站建设设计外包公司google安卓手机下载
  • web网站开发基本流程有哪些谷歌搜索优化
  • 江苏省建设斤网站推广app赚佣金平台有哪些
  • 网站怎么做支付微博推广平台
  • 如何在路由器上做网站转跳新媒体运营岗位职责
  • 网站建设制作价格低分类信息合肥seo排名公司
  • 怎么做网站播放器百度关键词指数排行
  • 室内设计师做单网站网络seo是什么意思
  • 网站开发与运营怎么样百度搜索引擎使用技巧
  • 溧阳网站建设价格免费的建站平台
  • 网站开发小组分工营销策划书模板
  • 哪个网站做批发最便宜又好看百度关键词搜索量查询
  • 佛山建设局网站网站制作开发
  • 小网站大全百度关键词下拉有什么软件
  • 家庭宽带 做网站网上营销策略有哪些
  • 十八个免费的舆情网站企业网站推广方案设计毕业设计
  • 深圳网站建设 设计首选深圳市合肥网站优化平台
  • 拖拽网站怎么做的百度网站快速优化
  • 如何区分网站开发语言顺德搜索seo网络推广
  • wordpress 用户前端网站优化流程
  • 建筑工程项目管理软件企业seo推广外包
  • 专业微信网站建设seo网站关键词优化机构
  • 西青网站文化建设全球网络营销公司排名
  • 怎么自己创建一个免费网站线上推广策划方案
  • 做家乡网站代码百度怎么联系客服