<form name='frm' action="Readcsvv" enctype="multipart/form-data" method="POST" >
<input type="file" name="file1"><br><br>
<input type="Submit" value="Upload File" onclick="showProgress()" method="POST">
<script>
function showProgress() {
if(document.frm.file1.value == "")
{
alert('Please upload a file');
}
else
{
document.getElementById('progress').style.display = 'block';
}
}
</script>
私のJSPファイルには上記のコードがあります。ファイルが選択されていない場合は、alert('Please upload a file')
が正常に表示されます。しかし、サーブレットプログラムReadcsvvを呼び出し、次のページに進みます。jspを使用してjavascript関数を呼び出す際の問題
アラートボックスを表示した後、同じページにプログラムしたいと思っています。私はそのために何をすべきですか?
[車/カーペット](http://stackoverflow.com/questions/245062/whats-the-difference-javascript-and-java/245068#245068)あなたは知っています... – aioobe