prova questa funzione javascript:
function makeaddress(){
ancora=document.getElementByID("nomemenu").value;
url="pagina.htm#"+ancora;
document.getElementById("idform").action = url;
}
<form action="" method="post">
...
<input type="submit" onsubmit="makeaddress()" />
</form>
prova così![]()