【发布时间】:2018-05-03 12:34:36
【问题描述】:
因为嵌套表单是一种不好的做法,我从我的网站源中制作了一个内部 iframe,用于加载另一个表单。因为它的内部我已经添加了样式和所有内容,但是在发布槽快递时(我也使用 sequelize 创建我的实体),即使加载了返回页面,我的数据也是空的。有什么我想念的吗?也许我必须指定 req.accepts(),我在问是否有人知道这种问题。
app.post('/sendOwners', function (req, res) {
ownerController
//these are empty even filled from the front end
.create(req, res, req.body.name,req.body.firstname, req.body.civility)
.then(function(owner){
res.send('contenu owner' +owner +'contenu req:'+req.body)
})
})
我的 iframe
<iframe id="iframeID"
name="_parent"
sandbox="allow-forms allow-same-origin"
src="owners"
></iframe>
【问题讨论】:
-
也许问题是:如何使用 express 解析 iframe 中的数据?
标签: javascript express iframe server sequelize.js