Found the answer on W3school:
Please always specify the type attribute for the button. The default type of Internet Explorer is "button", and the default value in other browsers (including W3C specifications) is "submit".
I use Google Chrome, presumably the default type is "submit"
Solution:
<button type="button" onclick="ajaxPost()">提交</button>
Add type="button"