Get the App
SLTechnology News&Howtos  ›  Development  › 

How to add favorites to JavaScript

Shulou Source: shulou.com Published: 2022-06-01 02:56:39 10月03日 Update

This article mainly introduces JavaScript how to join the favorites judgment, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Add favorites

Function addFavorite (sURL, sTitle) {

Try {

Window.external.addFavorite (sURL, sTitle)

} catch (e) {

Try {

Window.sidebar.addPanel (sTitle, sURL, "")

} catch (e) {

Alert ("failed to add favorites, please use Ctrl+D to add")

}

}

} Thank you for reading this article carefully. I hope the article "how to add JavaScript to your favorites" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Articles favorites value interest at the same time more friends knowledge editing industry information information channels channels reference learning help support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Information Linux Docker Microsoft