If you have form post method, like:
<form name="myForm" action="/myController/DoSomething?someId=myId" method="post">
and you want myId to change to something else, then you can use this code:
var myPom = $("form[name=myForm]").attr('action'); myPom = myPom.replace("myId", "123"); $("form[name=myForm]").get(0).setAttribute('action', myPom);