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

前端 未结 6 1691
别跟我提以往
别跟我提以往 2021-02-10 12:20

Is there any difference between

1 : Link1

and

2 : 

        
6条回答
  •  执念已碎
    2021-02-10 12:49

    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.

提交回复
热议问题