What is the Difference between onclick and href="[removed]function name?

前端 未结 6 906
夕颜
夕颜 2021-02-10 11:55

Is there any difference between

1 : Link1

and

2 : 

        
6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-10 12:40

    No performance difference.

    The first is crap because it will fail completely for users without JS enabled.

    The second is still crap, but would be better if the href pointed to a URL for users without JS enabled.

提交回复
热议问题