美化表单中的 效果展示: 这里将<input type=“file” >隐藏,用按钮实现点击上传文件 代码展示 <input type="file" name="file" id="path" style="display:none;" onchange="this.form.submit();"> <input type="button" value="更新头像" onclick="path.click()">