Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of Imperial CMS joining Collection and setting it as Home Page

Shulou Source: shulou.com Published: 2022-06-02 05:07:07 11月11日 Update

This article mainly introduces the Empire CMS to join the collection and set as the home page method, the article is very detailed, has a certain reference value, interested friends must read!

How does Empire CMS work by adding favorites and setting it as a home page?

This article describes the example of the empire CMS to achieve the collection and set as the home page method. Share it for your reference. The specific implementation method is as follows:

Add Favorites, Set as Home Code, Compatible with IE, Firefox, Google, etc. All browsers, copy the following code to the place where it needs to be displayed:

The code is as follows:

Add to Favorites

Copy the following JS code anywhere on the page:

The code is as follows:

function AddFavorite(sURL, sTitle) { sURL = encodeURI(sURL); try{ window.external.addFavorite(sURL, sTitle); }catch(e) { try{ window.sidebar.addPanel(sTitle, sURL, ""); }catch (e) { alert("Add to Favorites failed, use Ctrl+D to add, or manually set in browser. ");} } }//Set Home function SetHome(url){ if (document.all) { document.body.style.behavior ='url (#default#homepage)'; document.body.setHomePage(url); }else{alert("Hello, your browser does not support automatic setting of pages as home pages, please manually set this page as home pages in your browser!" "); } } The above is all the contents of the Empire CMS collection and home page method, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Tags: Home page code method empire browser browse page content place manual reference hello value interest function example boy buddy more Firefox Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Docker Huawei OPPO Reno MySQL