I want the same result without using the onchange
attribute.
Some ideas?
Here's the HTML:
<select onchange="filtro(this)" id="tipo" name="noticia/conteudo/tipo">
<option value="Layout1">Layout1</option>
<option value="Layout2">Layout2</option>
<option value="Layout3">Layout3</option>
<option value="Layout4">Layout4</option>
<option value="Layout5">Layout5</option>
</select>
Here is the JS:
function filtro(a) {
var x = (a.value || a.options[a.selectedIndex].value);
alert(x);
if (x == "Layout4"){
alert('test4');
}
}