how to use javascript change the form action
<pre><code>&lt;div class="fr_search"    
  &lt;form action="/"  accept-charset="UTF-8" method="post" id="search-theme-form"&gt;
  .......
  &lt;/form&gt;
&lt;/div&gt;
</code></pre>

<p>now i want to write a function to change the form action and method, when it equal a condition. how to write the code. thank you. eg: </p>

<pre><code>function test(){
   if(selectedIndex === 1)....
}// how to write the code.
</code></pre>
