title: How to clear HTML data list current options?
body: <p>I am writing an dynamic data list. However, when I tried to update the list, the previous didn't clear. Are there any solutions?</p>
  
  <p>Here is my code</p>
  
  <pre><code> function loadDataList(selectedSchoolName)
      {
          var options = '';
          //document.getElementById('schoolNameList').remove();
          for(var i = 0; i &lt; selectedSchoolName.length; i++)
          {
              options += '&lt;option value="'+ selectedSchoolName[i] +'" &gt;';
          }
          document.getElementById('schoolNameList').innerHTML = options;
      }
  </code></pre>
  
  <p>Thank You</p>