Search.js without Jquery

用Javascript dom实现rest api search的操作: import axios from “axios” class Search { // 1. describe and create/initiate our object constructor() { this.addSearchHTML() this.resultsDiv = document.querySelector(“#search-overlay__results”) this.openButton = document.querySelectorAll(“.js-search-trigger”) this.closeButton = document.querySelector(“.search-overlay__close”)

Share :

上一篇:

下一篇: