Home>Topic List> 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
19832 times of learning
Collection21489 times of learning
Collection90667 times of learning
Collection19117 times of learning
Collection