标签:tor add margin doc lin seo order block ora
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> *{ margin: 0; padding: 0; } li{ display: inline-block; width: 50px; height: 30px; border: 1px solid red; } </style> </head> <body> <ul> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> <script> var index; var lis=document.querySelectorAll("ul li"); console.log(lis.length) for (var i=0;i<lis.length;i++) { (function(index){ lis[index].onmouseover=function(){ console.log(index) } })(i) } </script> </body> </html>
标签:tor add margin doc lin seo order block ora
原文地址:https://www.cnblogs.com/daifuchao/p/11767893.html