HTML set as homepage and add to favorites_Powernode Java Academy

HTML set as homepage and add to favorites_Powernode Java Academy

How to implement the "Set as homepage" and "Add to favorites" functions in IE browser

Solution:

The function of setting the specified URL as the homepage mainly relies on the setHomePage method of IE's default behavior homePage, while the implementation of adding the specified URL to the favorites is the AddFavorite method of the external object.

Specific steps:

Set as Homepage

<a href="http://www.bjpowernode.com"   
   onClick="this.style.behavior='url(#default#homepage)';  
            this.setHomePage('http:// www.bjpowernode.com ');  
            return(false);"   
   style="behavior: url(#default#homepage)">  
    Set as homepage</a>  

Add to favorites:

<a href=" www.bjpowernode.com "   
  onclick="window.external.addFavorite(' www.bjpowernode.com ','Power Node');  
           return false;"   
  title="Add this site to your favorites!"   
  align="center">  
   Add to favorites</a>  

Please use IE browser for testing.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

<<:  Analysis of HTTP interface testing process based on postman

>>:  MySQL 8.0.22 winx64 installation and configuration method graphic tutorial

Recommend

WeChat applet implementation anchor positioning function example

Preface In the development of small programs, we ...

Windows 2016 Server Security Settings

Table of contents System update configuration Cha...

How to use the WeChat Mini Program lottery component

It is provided in the form of WeChat components. ...

JavaScript to achieve progress bar effect

This article example shares the specific code of ...

Detailed explanation of the usage of DECIMAL in MySQL data type

Detailed explanation of the usage of DECIMAL in M...

Analyze the method of prometheus+grafana monitoring nginx

Table of contents 1. Download 2. Install nginx an...

Example method of deploying react project on nginx

Test project: react-demo Clone your react-demo pr...

CocosCreator Universal Framework Design Network

Table of contents Preface Using websocket Constru...

How to install JDK 13 in Linux environment using compressed package

What is JDK? Well, if you don't know this que...

JavaScript design pattern learning adapter pattern

Table of contents Overview Code Implementation Su...

Detailed explanation of MySQL user rights verification and management methods

This article uses examples to illustrate how to v...

Detailed explanation of JS ES6 coding standards

Table of contents 1. Block scope 1.1. let replace...

How to install babel using npm in vscode

Preface The previous article introduced the insta...

In-depth analysis of JDBC and MySQL temporary tablespace

background Temporary tablespaces are used to mana...

Docker Tutorial: Using Containers (Simple Example)

If you’re new to Docker, take a look at some of t...