2
根据我的情况,用户需要提交他/她的个人资料图片,然后获取图片的URL并保存用户配置文件(包括用户名,性别,年龄和配置文件图片的URL)发送到服务器。如何在网页中添加嵌套的HTML表单标签
以下代码不起作用,因为我认为nested-forms
是不允许的。那么有人可以帮我解决这个问题吗?
<form role="form" action="/submitTheProfile" method="post" >
<input type="text" name="fname" id="f1-first">
<input type="text" name="age" id="f2-first-name">
<input type="text" name="gender" id="f3-first-name">
<form role="form" action="/profilePicUpload" method="post" >
<input id="file-0b" class="file" type="file">
</form>
</form>
可能重复的[你可以嵌套的HTML表单?](http://stackoverflow.com/questions/379610/can-you-nest-html-forms) –
这可能会帮助你。 http://stackoverflow.com/questions/597596/how-do-you-overcome-the-html-form-nesting-limitation –
答案是:在ajax的帮助下。 – nicael