【发布时间】:2016-01-05 05:07:20
【问题描述】:
我有一个按钮,当用户点击这个按钮时,数据库中的数据会被修改。
这两种解决方案之间哪个更安全:
<button id="the_button"> click me </button>
$("#the_button").on("click",function(){
// send a character to server with Ajax
};
或
<form method="POST" action="/theurl">
<input type="submit" value="click me" id="the_button">
</form>
最后,我只有一个按钮。
【问题讨论】:
-
两种方法都比另一种更安全。
标签: javascript html