JavaScript function in href vs. onclick

后端 未结 15 2254
栀梦
栀梦 2020-11-22 07:17

I want to run a simple JavaScript function on a click without any redirection.

Is there any difference or benefit between putting the JavaScript call in the hr

15条回答
  •  时光取名叫无心
    2020-11-22 07:45

    I experienced that the javascript: hrefs did not work when the page was embedded in Outlook's webpage feature where a mail folder is set to instead show an url

提交回复
热议问题