1, 在html的头部引入两个js, (可自行百度下载到本地,也可以引用cdn地址)
<script type="text/javascript" src="../static/js/babel.min.js"></script>
<script type="text/javascript" src="../static/js/polyfill.min.js"></script>
2,设置用到es6语法的script标签的type="text/babel" chaset="UTF-8"