87,997
社区成员




<form action="/shangchuan" method="post" enctype="multipart/form-data">
<h2>单图上传</h2>
<input type="file" name="logo" multiple="multiple" accept="image/png">
<input type="hidden" name="my" value="crr">
<input type="submit" value="提交" id="abc">
</form>
var multer = require('multer');
var upload = multer({dest: 'upload/'});
router.post('/shangchuan', upload.array('logo',10), function(req, res, next){
请问这里怎么写?
});
<iframe width="0" height="0" border="0" name="dummyframe" id="dummyframe"></iframe>
<form action="shangchuan" target="dummyframe">
<!-- form body here -->
</form>
function SubForm (){
$.ajax({
url:'/shangchuan',
type:'post',
data:$('#YOUR_FORM_ID').serialize(),
success:function(){
alert("worked");
}
});
}
sol2.
<iframe width="0" height="0" border="0" name="dummyframe" id="dummyframe"></iframe>
<form action="submitscript.php" target="dummyframe">
<!-- form body here -->
</form>