title: Javascript innerHtml and value for textbox and label issue
body: <p>I have below javascript code.</p>
  
  <pre><code>var txtone = document.getElementByID("txtone");
  var lblone = document.getElementByID("lblone");
  var tone =  txtone.value;
  var lone = lblone.innerHTML;
  </code></pre>
  
  <p>Now the problem is there are cases when I dont have txtone or lblone in my page so in that case last two lines of my code gives error.</p>
  
  <p>solution for this is to check if they exists might be like this code.</p>
  
  <pre><code>var txtone = document.getElementByID("txtone");
  var lblone = document.getElementByID("lblone");
  if(txtone)
  var tone =  txtone.value;
  if(lblone)
  var lone = lblone.innerHTML;
  </code></pre>
  
  <p>but In my case I have around 100 to 200 textbox and labels with are rendered based on some condition. So in that case I dont think the give solution will be the best one.</p>
  
  <p>Is there any easy way out to my problem something like prototyping value or innerHtml.</p>
  
  <p>(It is an aspx web site page)</p>