mui 设置时间

    <script>
        function setmuitime() {
            var btn_time = document.getElementById('time1');
            var day1 = new Date();
            var s1 = day1.getFullYear() + "-" + (day1.getMonth() + 1);

            btn_time.setAttribute('val', s1);
            btn_time.innerText = s1;
        }
        setmuitime();
    </script>

 

posted @ 2020-12-31 16:54  enych  阅读(261)  评论(0编辑  收藏  举报