Window. External usage (favorites function)

Source: Internet
Author: User
Introduction: window. External. AddFavorite, a script that adds a website to the favorites folder of a browser, should be read frequently. But do you still know other usage of window. External? Some commands related to system file operations may cause errors in security settings.

1. External. adddesktopcomponent uses the website as the user's Active Desktop
Syntax: External. adddesktopcomponent (address, type [image/website], left distance, top distance, width, length)
Function j_adc () {// example
Window. External. addmediatopcomponent ("http: //...", "website", 800,600 );
}

2. External. AddFavorite adds the website to your favorites

Syntax: External. AddFavorite (URL, title );
Function j_af (){
Window. External. AddFavorite (location. href, document. Title );
}

3. External. navigateandfind search for a field in a specified website

Syntax: External. navigateandfind (file address, keyword, _ target)
<Script language = "JavaScript">
Function j_an (){
Window. External. navigateandfind ("http: //...", gosearch. value ,"");
}
</SCRIPT>

4. External. showbrowserui language selection window and favorites Management window

Syntax: External. showbrowserui (type [Export agedialog/organizefavorites], null)
<Input type = "button" name = "button" value = "language Settings" onclick = "window. External. showbrowserui ('your agedialog ', null)">
<Input type = "button" name = "submit2" value = "" onclick = "window. External. showbrowserui ('organizefavorites ', null)">

5. Import and Export user favorites using external. importexportfavorites

Syntax: External. importexportfavorites (Import/true export/false, file path)
<Input type = "button" name = "button" value = "Import favorites" onclick = Window. External. importexportfavorites (true, "http: //...");>
<Input type = "button" name = "button3" value = "Export favorites" onclick = Window. External. importexportfavorites (false, "http: //...");>

Tantom: there are similar programs for worry-free scripts. You can try it, but you cannot use PHP to receive user favorites, but importing is very simple. ASP and PHP are used in the hand to receive the user's favorites code. asp has never tried and is not available. php has tried, but can only receive 75% of the favorites materials, which is quite strange, if you are interested in PHP and ASP code, post on the forum.

External has several usage options, but they are useless and are not listed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.