Rat*_*Don 12 html forms onsubmit
<form onsubmit="return confirm('Are you sure you want to rollback deletion of candidate table?')">
<input type='submit' name='delete' value='Undo' />
<input type='submit' name='no' value='No' />
Run Code Online (Sandbox Code Playgroud)
当用户点击第二个提交按钮时,即No我想将确认对话框显示为"您确定要提交交易吗".
Rat*_*Don 25
<form method='post'>
<input type='submit' name='undo' value='Undo' onclick="return confirm('Are you sure you want to rollback deletion of candidate table?')"/>
<input type='submit' name='no' value='No' onclick="return confirm('Are you sure you want to commit delete and go back?')"/>
</form>
Run Code Online (Sandbox Code Playgroud)
工作得很好.刚换onsubmit()到onclick().因为在这种情况下两者的功能是相同的.
| 归档时间: |
|
| 查看次数: |
67851 次 |
| 最近记录: |