技术笔记
提交文件及图片类型表单注意问题点
 moons   2020-07-30 11:34:16   107
专栏分类: javascript
    <form method="post" id="create_form" action="" enctype="multipart/form-data">
    	<table style="display: table;">
    		<tr>
    			<td>任务名称:</td>
    			<td><input type="text" id="taskName" name="taskName" maxlength="40"></td>		  </tr>
    		<tr>
    			<td">操作说明:</td>
    				<td><input type="file" id="instructions" name="instructions"></td>		    </tr>
    		<tr>
    			<td colspan='2'>
    				<div>
    					<button type="button" id="submit-btn">提交</button>
    				</div>
    			</td>
    		</tr>
    	</table>
    </form>

### 调用
    $("#submit-btn").click(
        function(e){
        $("#create_form").submit();
        }
    )
Copyright © mos360.cn By Moons Soft Studio 百度统计