From 442cf3643a53b509c145bc02031f7dd1d02ebbb9 Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Thu, 11 Nov 2021 18:00:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 5d19ed6..ddaba6e 100644 --- a/index.html +++ b/index.html @@ -60,11 +60,13 @@ init() { this.dom = document.querySelector("div[data-root=p1457912674670354432]"); - var title = this.dom.querySelector('.title'); + if (this.dom) { + var title = this.dom.querySelector('.title'); - var myDate = new Date(); - var tMonth = myDate.getMonth(); - title.innerHTML = tMonth === 0 ? '12月份工资表' : tMonth + '月份工资表'; + var myDate = new Date(); + var tMonth = myDate.getMonth(); + title.innerHTML = tMonth === 0 ? '12月份工资表' : tMonth + '月份工资表'; + } }, jumpDetails(that) {