質問: このコードはStartValidation function
. なんで?
<html>
<head>
<script src="/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#frmUp').find("input[type = 'submit']").click(function () {
$('#frmUp').submit();
});
});
function StartValidation() {
return true;
}
</script>
</head>
<body>
<div>
@using (Ajax.BeginForm("UploadRequestFile", "FileUpload", new AjaxOptions
{
HttpMethod = "POST",
OnBegin = "return StartValidation();"
}, new { id = "frmUp" }))
{
<input type="submit" name="Submit" value="Submit" />
}
</div>
</body>
</html>
ランタイム マークアップ
<form method="post" id="frmUp" data-ajax-method="POST"
data-ajax-begin="return StartValidation();" data-ajax="true"
action="/fileupload/UploadRequestFile?Length=10">
<input type="submit" value="Submit" name="Submit">
</form>