JSFiddle - React, Tailwind, and code Playground
HTML
<form name="store" id="store" method="post" action="">
<select name="storeID">
<option value="/stores/store6.php">6</option>
<option value="/stores/store10.php">10</option>
</select>
</form>
JavaScript
document.getElementById('store').storeID.onchange = function() {
var newaction = this.value;
document.getElementById('store').action = newaction;
};