title: How can I use data collection from firestore in html
body: <p>currently I creating the website using cloud firestore as my database. Right now I can query the data from my collection but it didn't work when I try to display that data on my html web page.</p>
  
  <pre><code>const firebase = require("firebase/app")
  
  require("firebase/firestore")
  
  var firebaseConfig = {
      apiKey: "AIzaSyCxrJbfDOorE9H4E0I2O98tLftoxFAHNLU",
      authDomain: "school-bus-tracking-syst-3ff71.firebaseapp.com",
      databaseURL: "https://school-bus-tracking-syst-3ff71.firebaseio.com",
      projectId: "school-bus-tracking-syst-3ff71",
      storageBucket: "school-bus-tracking-syst-3ff71.appspot.com",
      messagingSenderId: "200434933461",
      appId: "1:200434933461:web:4cece32389af487c944c5c",
      measurementId: "G-Q9C278TWTV"
  };
  firebase.initializeApp(firebaseConfig);
  var firestore = firebase.firestore();
  
  const inputTextfield = document.querySelector("#contactnum");
  
  const docRef = firestore.doc("driver/D001");
  docRef.get()
      .then(function(querySnapshot) {
          querySnapshot.forEach(function(doc) {
              inputTextfield.innerText = doc.data().contactNo;
          });
      })
      .catch(function(error) {
          console.log("Error getting documents: ", error);
      });
  </code></pre>
  
  <p>and my HTML file is</p>
  
  <pre><code>&lt;script src="https://www.gstatic.com/firebasejs/7.13.2/firebase-app.js"&gt;&lt;/script&gt;
  &lt;script src="https://www.gstatic.com/firebasejs/7.13.2/firebase-firestore.js"&gt;&lt;/script&gt;
  &lt;input type="text" id="contactnum"&gt;
  &lt;script scr = "./we.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I tried this but I don't get anything display on my html website. Thank you in advance!</p>