Next, in the form tag, add the onsubmit="displayName();return false;" attribute.
接下来,在表格标签中,添加onsubmit="displayName();returnfalse;"属性。
When a user presses the submit button, the code placed in the onsubmit handler is executed before the form is submitted to the server.
当用户按下submit按钮时,在向服务器提交表单之前将执行onsubmit处理程序中的代码。
When a user presses the submit button, the code placed in the onsubmit handler is executed before the form is submitted to the server.
当用户按下submit按钮时,在向服务器提交表单之前将执行onsubmit处理程序中的代码。
应用推荐