//表单
<form method="post" action="" id="form" name="myform" >
</form>
//JS
function yoo() { var formUrl = "{:U('index')}"; form.action = formUrl; form.submit(); }//按钮<input type='button' onclick = 'yoo()'>
//表单
<form method="post" action="" id="form" name="myform" >
</form>
//JS
function yoo() { var formUrl = "{:U('index')}"; form.action = formUrl; form.submit(); }//按钮<input type='button' onclick = 'yoo()'>