javascriptでactionを振り分ける
index.php
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=EUC-JP” />
<script>
function test1(obj)
{
alert(“よろしいですか”);
obj.form.action =’../index3.php’;
obj.form.submit();
return false;
}
function test2(obj){
obj.form.action =’../index2.php’;
obj.form.submit();
return false;
}
</script>
</head>
<form method=”” action =”#”>
<input type=”hidden” name=”hoge” value=”aaa” />
<input type=”submit” submit=”button” value=”更新” onclick=”return test1(this);return confirm(‘よろしいですか?’)”></a>
<input type=”submit” name=”button” onclick=”return test2(this);” />
</form>
</html>