title: How to get inner content form label which have a child in JavaScript?
body: <p>Suppose, a HTML content like:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
     &lt;label class="control-label"&gt;Title &lt;span class="text-danger"&gt;*&lt;/span&gt;&lt;/label&gt;
     &lt;input type="text" name="sms_title" id="sms_title" class="form-control" required="required" placeholder="SMS Title" onblur="_field_validate('sms_title')" &gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I get label content title in JavaScripts.
  My JS Function:</p>
  
  <pre><code>function _field_validate(fieldId) {
  var chars = /[^a-zA-Z 0-9_]/g;
  var elem = document.getElementById(fieldId);
  if (typeof elem !== 'undefined' &amp;&amp; elem !== null) {
      var input = document.getElementById(fieldId).value;
      if (!input) {
          return false;
      } else if (chars.test(input)) {
          console.log("this not proper stirng. You may do something here.");
          return false;
      } else {
          var url = site_url + "/notice/get_sms";
          get_data(url).then(function (result) {
          //PROMISE return data
              if (!result) {
                  return false;
              } else {
                  var i = 0;
                  var flag = 0;
                  result.forEach(function () {
                      if (result[i][fieldId] == input) {
                          console.log(result[i][fieldId]);
                          flag = 1;
                          var parent = document.getElementById(fieldId).parentNode;
                          var label = parent.getElementsByTagName("label").innerHTML;
                          console.log(label); //here console the label content
                          alert.innerHTML = 'alert-text';
                          alert.style.margin = 0 + "px";
                          alert.style.paddingLeft = 6 + "px";
                          alert.className = 'text-danger';
                          alert.id = 'alert-field';
                          parent.appendChild(alert);
                      }
                      i++;
                  });
              }
          });
      }
    }
  }
  </code></pre>
  
  <p>get_data function return a database data. this is evrything is ok. but how i get the label content?</p>