event.preventDefault()Returns: undefined
Description: If this method is called, the default action of the event will not be triggered.
-
version added: 1.0event.preventDefault()
- This method does not accept any arguments.
For example, clicked anchors will not take the browser to a new URL. We can use 登录查看完整内容