JS 浏览器环境下 当前页面 document全局变量就是当前页面的dom对象 从html中解析 new DOMParser().parseFromString(html, "text/html") nodejs环境下 child::JSDOM获取DOM对象