1

我应该为取消按钮实现什么,以便当用户按下它时,屏幕返回到所有可编辑字段的先前值?

我有一个按钮:

<button type="submit" id="btnCancel" name="Command" value="Cancel">
  Cancel
</button>

和控制器中处理提交类型的 POST 事件的方法。不确定我是否应该通过这种方式处理更改中止;或者有一些 jQuery 在视图中处理这个问题。您能否提一些建议?

4

1 回答 1

1

我想你会想像这样改变你的按钮......

<button type="reset" id="btnCancel" name="Command" value="Cancel"> Cancel </button>

演示

于 2013-10-24T21:36:36.407 回答