I have this Search / Serialize JSFiddle , but I did not want it get the name of select
, only value
of option
and do search.
Can you ignore name
and only use value
?
Here is the code:
var host = "http://www.rs1.com.br/";
$(document).ready(function(){
$('#send').click(function(){
var variables = $('#form').find('campo').serialize();
var destination = host + variables.replace('=','/');
$('#link').html(destination)
window.open(destination);
});
});
<form id="form">
<select>
<option value="tutto-moto" class="campo">Tutto</option>
</select>
<select>
<option value="Acessorio" class="campo">Tutto</option>
</select>
<select>
<option value="produto" class="campo">Iphone+4s</option>
</select>
</form>
<button type="button" id="send" class="btn">Buscar</button>