JavaScript Reference/Javascript Methods/AddFavorite

Материал из Web эксперт
Перейти к: навигация, поиск

"AddFavorite()" Example

    
<html>
<head>
<script language="JavaScript">
    function function1() {
        window.external.AddFavorite("http://www.wbex.ru");
    }
</script></head>
<body>
<button onclick="function1();">
Click here to add www.wbex.ru main page to your favorites
</button>
</body>
</html>



"AddFavorite()" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |external                                                      |
+----------------+--------------------------------------------------------------+



"AddFavorite()" Syntax, Parameters and Note

Note:
Add to the list of favorites.
    
Syntax:
    
window.external.AddFavorite(param1, param2)

Parameters:
    param1   Required; the URL of the favorite element.
    param2   Optional; the user"s description.