How to add favorites to JavaScript
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!