[removed]; vs [removed]void(0);

后端 未结 3 1612
野趣味
野趣味 2020-12-25 12:54

I would like to know what is the difference between javascript:; and javascript:void(0); if I use them in href attribure for a

3条回答
  •  醉梦人生
    2020-12-25 13:30

    One runs JavaScript that has no statements, the other runs JavaScript that evaluates the statement 0 and then returns undefined.

    Neither should be used.

提交回复
热议问题