我有一个带有两个提交按钮的表单(发送消息和更新状态)。我想在点击send_message按钮时打开一个弹出窗口并显示send_message表单。请告知如何继续
<form name="send_messages" action="/sendMessage/" method="post" accept-charset="UTF-8">
<div class="user-add">
<span>
<select name="user-status" id="user-status" onchange="showDiv(this)">
<option value="">Select Status</option>
<option value="0">Enable</option>
<option value="1">Disable</option>
</select></span>
<button id="hidden_div" style="display:none;" name="button-status" value="user-status-send"
onchange="this.form.submit()"><i class="fa fa-pencil statusup"></i>Update Status
</button>
<span><button id="merge_button" name="button-status" value="message-send" >
<i class="fa fa-envelope"> </i>Send Message</button>
</span>
</div>
答案 0 :(得分:0)
您可以在模态<iframe id='submitFormFrame' />
中创建一个框架,然后将目标属性设置为指向该框架<form target='#submitFormFrame'>