JS小tips -- e.preventDefault和e.returnValue=false

1. e.preventDefault 阻止事件的默认行为,之前我一直对事件默认行为不知道是啥,现在终于知道一点了。比如checkBox:  <!DOCTYPE html> <html> <head>     <title>    </title> </head> <body>     <input id="testEvent" type="checkBox" name=""> </body> <
相关文章
相关标签/搜索