On Feb 15, 8:41 pm, "angelochen...@gmail.com"
<angelochen...@gmail.com> wrote:
> Hi,
> I have this:
> var state = $("sele...@name='state']").get(0).value;
> but there are times there is no select element in the html, and cause
> this statement to fail,
> how to check if there is  'sele...@name='state']' present in the html?

  if (document.getElementsByTagName('select').length) {
    // there is at least one select element in the document
  }


--
Rob

Reply via email to