2
중첩 된 양식이있는 방법은 있습니까? 내가 중첩 된 형태중첩 된 양식의 솔루션
중첩 된 양식이있는 방법은 있습니까? 내가 중첩 된 형태중첩 된 양식의 솔루션
아니 당신이 중첩 된 수없는 형태지만 문제에 대한 간단한 해결책이없이 동일한 기능을지고 돌아 다니면서 얼마나이
<form action="" method="post">
<input type="text".... />
<input type="text".... />
<form action="some action">
<input type="submit" .... />
</form>
</form>
없는 경우 같은
.
//if user clicks on the first submit button, action1 is triggered
if (isset($_POST['action']) && $_POST['action'] == 'action1') {
// do something
}
//if user clicks on the second submit button, action2 is triggered
if (isset($_POST['action']) && $_POST['action'] == 'action2') {
// do something else
}
PS :
<form action="" method="post">
<input type="submit" name="action" value="action1" />
<input type="submit" name="action" value="action2" />
</form>
당신은이 코드는 양식 제출을 처리하는 PHP를 사용하는 경우
public class ExampleController : Controller
{
....
[HttpPost]
public ActionResult Index(string action)
{
if (!string.IsNullOrEmpty(action) == "action1") {
// Do something
}
if (!string.IsNullOrEmpty(action) == "action2") {
// Do something
}
}
...
}
: 나는 당신이 C# 및 .NET 작업을 볼 때, 이것은로 번역 될 것이다
중첩 된 양식으로 달성하고자하는 것은 무엇입니까? 참고 사항 : HTML5 양식 요소는 '