Little white rats and poison problem solving process analysis is ARESTO

2023-03-16  

$ (function () { 
             $ .ajax ({{ 
                 url: "http://127.0.0.1:3000/public/users", " 
                 Method: "get", 
                 Success: Function (data) { 
                     data.Foreach (Item => {{ 
                         $ (`<div class =" user-card "> 
                                 <div class = "head"> 
                                     <img src = "$ {item.img}" alt = "" srcset = ""> 
                                 </div> 
                                 <div class = "info"> 
                                     <div class = "row"> 
                                         <span> ID </span> 
                                         <span> $ {item.id} </span> 
                                     </div> 
                                     <div class = "row"> 
                                         <span> Name </span> 
                                         <span> $ {item.name} </span> 
                                     </div> 
                                     <div class = "row"> 
                                         <span> Gender </span> 
                                         <span> $ {item.sex} </span> 
                                     </div> 
                                     <div class = "row"> 
                                         <span> mobile phone number </span> 
                                         <span> $ {item.tel} </span> 
                                     </div> 
                                 </div> 
                             </div> `) .appndto ($ (". User-List ")) 
                     }); 
                 }, 
                 error: function () { 
                     Alert ("Run errors") 
                 } 
             }) 
         }) 

         // The second cycle writing 
         // $ .ajax ({ 
         // url: "http://127.0.0.0.1:3000/public/users", 
         // Success: Function (data) { 
         // console.log (data); 
         // str = ""; 
         // for (var I = 0; I <data.Length; i ++) { 
         // str += `<div class =" box "> 
         // <div class = "box1"> 
         // <img src = "$ {data [i] .img} class =" IMG "> 
         // </div> 
         // <div class = "box2"> 
         // <p> Name: $ {data [i] .name} </p> 
         // <p> Gender: $ {data [i] .sex} </p> 
         // <p class = "phone"> Mobile number: <span class = "white"> $ {data [i] .tel} </span> </p> 
         // </div> 
         // </div> ` 
         //} 
         // $ ("Body"). HTML (STR) 
                 // var phone = document.queryselectOrall (". Phone") 
                 // var White = document.queryselectOrall (". White") 
                 // for (var I = 0; I <phone.length; i ++) { 
                 // phone [i] .onmousemove = Function () {{ 
                 // this.style.background = "#333" 
                 // White [i] .style.color = "#fff" 
                 // White [i] .style.width = "120px" 
                 //} 
                 // phone [i] .onmouseout = function () { 
                 // This.style.background = "#fff" 
                 // White [i] .style.color = "Black" 
                 // White [i] .style.width = "100px" 
                 //} 
                 //} 
         //} 
         //})

source

Related Posts

STM32F030CT86 timer 3 channel 1 to verify the PWM front and rear cut mode

Simply achieve the effect of horse rampant lights with code

OPENCV extract the maximum rectangular border line

Simply talk about UI-Route

Little white rats and poison problem solving process analysis is ARESTO

Random Posts

[NUMPY] Matrix multiplication and point multiplication spade

Android fast implementation file download (only 4 lines of code) laer

[Play to Pointpillars] Pillarscatter operation

Seeking the shortest path of the picture 2 Detailed explanation of the Dijkstra algorithm Eric

C ++ Exception Handling (abnormal processing) part1 The two most common errors in the