<a>标签中避免重复点击事件的发生

本文详述了在JSP页面中使用JS实现按钮功能动态控制的方法,具体介绍了如何通过JS函数移除和重新设置按钮的点击事件,以及通过Ajax进行后台数据请求的过程。
jsp中:

<div class="layui-inline">
    <a class="layui-btn layui-btn-normal addNews_btn" onclick="batchAddItem()" id="changeGrn">批量选择</a>
</div>

js中:

//批量选择
function batchAddItem(){
     $("#changeGrn").removeAttr("onclick");
     Comm.ajaxPost('${ctx}/mes/manage/list/toAdd', {id: id}, function (res) {
          if (res.success) {
                 $("#changeGrn").attr("onclick","batchAddItem()");
          }
     }
}

 

 

<blockquote class="ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0;"> -----原始邮件-----<br /> <b>发件人:</b><span id="rc_from">郭萌 <guomengcd@boe.com.cn></span><br /> <b>发送时间:</b><span id="rc_senttime">2025-09-25 16:50:08 (星期四)</span><br /> <b>收件人:</b> 郭萌 <guomengcd@boe.com.cn>, 朱学辉 <zhuxuehui@boe.com.cn><br /> <b>抄送:</b> <br /> <b>主题:</b> <br /> <br /> <p style="text-wrap-mode:wrap;"> <span style="font-family:"Microsoft YaHei";font-size:14px;line-height:1;">各位领导、同事好:</span> </p> <p style="text-wrap-mode:wrap;"> <span style="font-family:"Microsoft YaHei";"><span style="font-size:14px;">       </span><span style="font-size:14px;line-height:2;">感谢一直以来对“京东方电子科大研究院”工作上的支持,为了更好地提供平台服务,我们将定期进行项目推荐。以下为本期推荐卡,详情请点击下方目录阅览</span></span><span style="font-size:14px;font-family:"Microsoft YaHei";">:</span> </p> <div class="container" style="text-wrap-mode:wrap;"> <details><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b>基于铂系磷光分子的高性能深蓝光OLED</b></span></span></summary> <p> <span style="font-family:"Microsoft YaHei";font-size:14px;"><img src="/coremail/s?func=mbox:getComposeData&sid=*&composeId=1758790106104&attachId=1" alt="" width="640" height="360" title="" align="" /><br /> </span> </p> </details> </div> <div class="container" style="text-wrap-mode:wrap;"> <details><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b>OLED柔性屏印痕改善及叠层设计</b></span></span></summary> <p> <span style="font-family:"Microsoft YaHei";font-size:14px;"><img src="/coremail/s?func=mbox:getComposeData&sid=*&composeId=1758790106104&attachId=2" alt="" /><br /> </span> </p> </details> </div> <div class="container" style="text-wrap-mode:wrap;"> <details><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b>新型抗冲击、抗划痕柔性OLED盖板材料</b></span></span></summary> <p> <img src="/coremail/s?func=mbox:getComposeData&sid=*&composeId=1758790106104&attachId=3" alt="" /> </p> </details> </div> <div class="container" style="text-wrap-mode:wrap;"> <details><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b>双向高导热石墨膜</b></span></span></summary> <p> <span style="font-family:"Microsoft YaHei";font-size:14px;"><img src="/coremail/s?func=mbox:getComposeData&sid=*&composeId=1758790106104&attachId=4" alt="" /><br /> </span> </p> </details> </div> <div class="container" style="text-wrap-mode:wrap;"> <details><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b>相变热界面材料</b></span></span></summary> <p> <span style="font-family:"Microsoft YaHei";font-size:14px;"><img src="/coremail/s?func=mbox:getComposeData&sid=*&composeId=1758790106104&attachId=5" alt="" /><br /> </span> </p> </details> </div> <div class="container" style="text-wrap-mode:wrap;"> <details><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b>多模态触觉传感器</b></span></span></summary><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b><img src="/coremail/s?func=mbox:getComposeData&sid=*&composeId=1758790106104&attachId=6" alt="" /><br /> </b></span></span></summary></details> </div> <div class="container" style="text-wrap-mode:wrap;"> <details><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b>基于多孔MXene材料的柔性压阻式传感器</b></span></span></summary><summary><span style="color:#337FE5;font-family:"Microsoft YaHei";"><span style="font-size:14px;"><b><img src="/coremail/s?func=mbox:getComposeData&sid=*&composeId=1758790106104&attachId=7" alt="" /><br /> </b></span></span></summary></details> </div> <details><summary><b>皮肤自适应聚焦柔性微加工超声换能器阵列</b></summary><summary><b><img src="/coremail/s?func=mbox:getComposeData&sid=*&composeId=1758790106104&attachId=8" alt="" /><br /> </b></summary></details> <p> <br /> </p> <br /> <br /> <br /> <span> <hr class="signature-separator" align="left" style="margin:0.5em 0;width:30em;height:1px;background-color:#999;border:none;" /> <div style="font-family:微软雅黑;font-size:14px;white-space:normal;">   </div> <hr align="left" color="#b5c4df" size="1" style="font-family:微软雅黑;font-size:14px;white-space:normal;width:210px;height:1px;" /> <div style="font-family:微软雅黑;font-size:14px;white-space:normal;"> <p class="MsoNormal" style="margin-bottom:0px;"> <b><span style="font-family:微软雅黑, sans-serif;background-color:white;font-size:10pt;"></span></b> </p> <p class="MsoNormal" style="margin-bottom:0px;"> <span style="font-family:微软雅黑, sans-serif;font-size:10pt;font-weight:bold;"> </span> </p> <div> <p class="MsoNormal" style="margin-bottom:0px;"> <b></b> </p> <p class="MsoNormal" style="margin-bottom:0px;"> <span style="font-size:12px;">郭萌</span> </p> <p class="MsoNormal" style="margin-bottom:0px;"> <o:p style="margin-bottom:0px;margin-top:0px;"><span style="font-size:12px;font-family:微软雅黑;">项目管理与知识产权组</span></o:p> </p> <p class="MsoNormal" style="margin-bottom:0px;"> <span style="font-size:12px;">京东方电子科技大学研究院</span> </p> <p class="MsoNormal" style="margin-bottom:0px;"> <span style="font-size:12px;">技术战略与协创中心</span> </p> <p class="MsoNormal" style="margin-bottom:0px;"> <span style="font-size:12px;">集团CTO</span> </p> <p class="MsoNormal" style="margin-bottom:0px;"> <span style="font-size:12px;">m. +86-18708160604</span> </p> <p class="MsoNormal" style="margin-bottom:0px;">   </p> <div class="company" style="box-sizing:border-box;font-size:10pt;font-family:微软雅黑;word-break:break-all;line-height:21px;"> 京东方科技集团股份有限公司 </div> <div class="en_company" style="box-sizing:border-box;font-family:Arial, "Microsoft YaHei", serif;word-break:break-all;line-height:21px;"> BOE Technology Group Co., Ltd. </div> <div class="website" style="box-sizing:border-box;font-family:Arial, "Microsoft YaHei", serif;word-break:break-all;line-height:21px;"> www.boe.com </div> <o:p style="margin-bottom:0px;margin-top:0px;"></o:p> <p class="MsoNormal" style="margin-bottom:0px;"> <o:p style="margin-bottom:0px;margin-top:0px;"></o:p> </p> <p class="MsoNormal" style="margin-bottom:0px;"> ——————————————————<o:p style="margin-bottom:0px;margin-top:0px;"></o:p> </p> <p class="MsoNormal" style="margin-bottom:0px;margin-top:3.35pt;" align="left"> <b>注意:</b>本邮件及其随带之附件内容仅为收件人提供,可能包含<span lang="EN-US">BOE</span>应予保密之内容。如您并非本邮件写明之收件人,敬请切勿披露、复制、打印、转发或分发本邮件或其任何内容,亦请切勿依本邮件之任何内容而采取任何行动。如有上述情况发生或收到之邮件不清或有缺失,敬请立即通过电子邮件,电话或传真与发件人联系并将其从您的计算机系统中删除。多谢合作!<o:p style="margin-bottom:0px;margin-top:0px;"></o:p> </p> <p class="MsoNormal" style="margin-bottom:0px;margin-top:3.35pt;" align="left"> <b>NOTICE: </b>This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. It is the property of BOE. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Thank you for your cooperation!<o:p style="margin-bottom:0px;margin-top:0px;"></o:p> </p> </div> 分析下上述邮件源码有什么问题并修改
最新发布
09-26
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值