First, the problem description
A click event is added to a tag, and the page gives a direct 0
Second, problem solving
Background debugging mode, the discovery also into the background method, also returned to the page.
Then think of the page to remove most of the content, remove all JS, see if it is a part of the code has a problem, after doing so, found that JS completely removed, only the Click event, the effect is still so.
But there are a few strange places:
1. Into the backstage method, not finished, the page becomes 0
2. No matter what elements are removed from the page, the effect will be the same
3. Look at the browser debugger and find that the request is not responding at all
But the page already shows 0, starting to think there's a problem with the AJAX request, but the rewrite is still the case.
Finally think there must be a problem on the page, but do not know where, so the page only some of the labels to look carefully, some useless are killed.
Finally, there is a problem finding the A-tag href that triggered the event. Ah,!!!!!!!!!!!!!!!!!!!!!!!.
<class= "Preview" href= "javascript: (0);" > View </a>
Do not know whether others can see out, I am ignorant, a page so much content, this thing really can't find out.
Last time, pay attention to it later.
Correct wording:
<class= "Preview" href= "javascript:void (0);" > View </a>
Html--a Tag Add click event, Firefox direct display 0