jspsmart文件上传与邮件发送的实例

前端技术 2023/09/07 JSP

1、jspsmart文件上传(普通表单,带有普通表单域、若干个文件选择域)

页面:

复制代码 代码如下:

<form class=\"form-horizontal\" id=“estForm” action=\"/tools/toolServlet?type=est\" method=\"post\" enctype=\"multipart/form-data\">
<div class=\"control-group\">
<label class=\"control-label\" for=\"email\">Email</label>
<div class=\"controls\">
<input type=\"text\" id=\"email\" name=\"email\" placeholder=\"Email\" onblur=\"checkEmail()\">
<span class=\"help-inline\"></span>
</div>
</div>
<div class=\"control-group\">
<label class=\"control-label\" for=\"file\">File</label>
<div class=\"controls\">
<input type=\"file\" name=\"file\" id=\"file\" onchange=\"getFileInfo()\"/>
<span class=\"help-inline\"></span>
</div>
</div>

<!-- 隐藏文件域 begin
<div class=\"control-group\" id=\"hiddenFileDiv\" style=\"display: none;\">
<label class=\"control-label\" for=\"file\">File</label>
<div class=\"controls\">
<input type=\"file\" name=\"file1\" id=\"file1\" />
<span class=\"help-inline\"></span>
</div>
</div>-->
<!-- 隐藏文件域 end

<div class=\"control-group\">
<label class=\"control-label\" for=\"file\">crossmatch</label>
<div class=\"controls\">
<select name=\"crossmatch\" id=\"crossmatch\">
<option value=\"Y\">Y</option>
<option value=\"N\">N</option>
</select>
<span class=\"help-inline\"></span>
</div>
</div>-->
<div class=\"control-group\">
<div class=\"controls\">
<!-- <a href=\"javascript:void(0);\" id=\"upload\" class=\"btn\">submit</a>-->
<button type=\"submit\" class=\"btn\" id=\"upload\">submit</button>
<button type=\"reset\" class=\"btn\" id=\"reset\">reset</button>
</div>
</div>
</form>

本文地址:https://www.stayed.cn/item/17716

转载请注明出处。

本站部分内容来源于网络,如侵犯到您的权益,请 联系我

我的博客

人生若只如初见,何事秋风悲画扇。