1. <body>|
    2. <script>
    3. var arr=["a@b.com","c@d.com","a@b.com"]
    4. arr.forEach(item => {
    5. var count=0
    6. for(i=0;i<arr.length;i++){
    7. if(arr[i]==item){
    8. count++
    9. }
    10. }
    11. if(count==2){
    12. console.log("邮箱重复:"+item)
    13. }
    14. });
    15. </script>
    16. </body>