What you just did. You were tired and your clumsy hand dragged one of the buttons above the Search Bar into the Search Bar. Don't worry, we've all been through this.
"- How tf does it know??"

You, right now in front of your screen after having accidentally searched for "javascript:void(0)".
by pragmatic moron June 6, 2020
Get the javascript:void(0) mug.
What you just saw when you dragged a UI element into the search bar. This happens because web developers really like to use the HTML <a> element for buttons instead of the actual <button> element. You can give the element functionality by listening for its click event and doing things then, but the <a> element is intended for creating hyperlinks and as such won't work without a set href attribute (AKA the link that you are taken to when you click on it). Therefore, you can use the void JavaScript operator, which will return the value undefined. If the browser is told to go to undefined, it will just keep the current page open. void will also evaluate its operands first, so <a href="javascript:void(alert('you clicked me'))">click me</a> would show "you clicked me" when clicked, but most people would just use javascript:void(0) and alert "you clicked me" on the click event, as said before. Urban Dictionary uses the javascript:void(0) technique for some of its UI elements, so when you just dragged the browse (or categories, or cart) button into the search bar, and I know you did, its href attribute was copied into the search bar, and now you're looking at javascript:void(0) and contemplating your life choices.
guy 1: god fucking damn it i just dragged a ui element into the search bar and searched for javascript:void(0), thats so annoying why does it even happen

guy 2: it happens because people cant use the <button> element and have to use <a> for some reason
by rtxmorshu February 2, 2021
Get the javascript:void(0) mug.
Haha! You clumsy mf! You just dragged a UI element into the search bar! How stupid of you!
Fuck, i just dragged a UI element into the search bar and it lead to the definition of javascript:void(0) and I got called stupid on the internet.
by buddy retard July 31, 2021
Get the javascript:void(0) mug.
An error that occurs when the parameters of a method are null or 'void'
Dis site UrbanDict gave me a 'javascript:void(0)' message.
by Funkay September 4, 2006
Get the javascript:void(0) mug.
it looks like you accidentally clicked and dragged a button into the search bar and got the message "javascript:void(0)"
i just accidentally dragged the browse button to the search bar and "javascript:void(0)" popped up
by PoopShitter United December 29, 2022
Get the javascript:void(0) mug.