Home > Topic List > JavaScript:void 0

JavaScript:void 0

JavaScript:void(0) can be replaced by return false, event.preventDefault(), or an empty href attribute value. Detailed introduction: 1. return false, this method will not return undefined, and can be correctly interpreted by screen readers; 2. event.preventDefault(), event.preventDefault() can be called when clicking the link, so that the link will not navigate Go to a new page; 3. Empty href attribute value, 3. Use empty href attribute

Related courses More >
IntermediateIssue 20_Front-end development

20118 times of learning

Collection
AdvancedMVC tutorial

21809 times of learning

Collection
Elementaryjavascript elementary tutorial

91490 times of learning

Collection
Related Tutorials More >