I have an html code that is inserted inside a PHP variable
And inside I look for zip, if I use
<input alt='cep' class='text difCep' name='cep' id='cep' value='$cep' type='text' onblur='xajax_procurarEndereco(this.value);$(\"#loading\").css(\"visibility\",\"visible\");' />
It works fine, but the user wants a search button, so I have adapted the code and there is the problem, I can not get the value of the zip. I tried with document.getElementById ("field") and $ ('# cep'). Val ();
<label id='label_cep' for='cep'>CEP</label>
<input alt='cep' class='text difCep' name='cep' id='cep' value='$cep' type='text' />
<button type='button' onclick='xajax_procurarEndereco(buscar input do cep);$("#loading").css("visibility","visible");' style="padding: 6px; height: 24px; margin-left: 10px;">Buscar</button>