es6转化成es5

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
    </body>
    <script src="js/browser.min.js"></script>
    <script type="text/babel">
         let a=[{name:1},{name:2}];
         let html="";
         for(var i=0;i<a.length;i++){
            html+=`
             <div id="${a[i].name}">${a[i].name}</div>
            `;
         }
         document.write(html);


    </script>

</html>

猜你喜欢

转载自blog.csdn.net/u014692324/article/details/80723439