Sometimes I visit websites with colorful background, which makes words over it hard to read. So I type the following code in the address bar to solve this problem: javascript:document.body.style.background='none'; HTML: But I doesn't work. Therefore I change the code above to: javascript:document.body.style.background='none';void(0); HTML: And now it works. But I don't understand: What's the code void(0); for; Why won't this code work without void(0);. Any explanation will be appreciated.
So the script returns nothing, otherwise you'll lose the current page. You can also include the code into the void: javascript:void(document.body.style.background='none')