Jump to content
Sign in to follow this  
ijurq

Html - How To Add A Shortcut Icon To A Web Page?

Recommended Posts

saya dah cuba buat ..

tapi tak jd jugak .

mcm mane sebenarnye nak buat ?

Dari komputer ke web baca sini:

http://ask-leo.com/can_i_make_a_desktop_ic...e_shortcut.html

Right click on your desktop, and select "New Shortcut". Enter http://hotmail.com as the location of the item, hit next, give it a reasonable name (like "Hotmail"), and you're done.

It's just that easy.

If you like, you can then add that shortcut to your start menu as well. Click and hold on the desktop icon. Now drag it over the Start button. Don't let go, wait and the start menu will pop up. Drag the icon to a position on the menu and release. You could also hold it over a sub menu, wait for that to pop out, and then release in the position you would like it to live on that sub menu.

The reverse works as well... click and hold on a start menu item, drag it to your desktop and release. The shortcut will be removed from the menu and appear on your desktop. If you want the shortcut to remain in both places, hold down the CTRL key before you drop the icon on the desktop.

Shortcuts can be created for programs, as you probably already know, and URLs, as we just showed. You can also create shortcuts for any document or file that Windows knows how to handle: for example ".doc" files, ".mp3" files and others.

Web ke Favourite baca sini:

http://msdn.microsoft.com/workshop/Author/...hortcutIcon.asp

Associate the Icon with Your Web Page

After creating the icon, you must associate it with your Web page. One way is to save the icon with the default file name of favicon.ico in the root directory of your domainfor example, www.microsoft.com/favicon.ico. Each time your Web page is added to a user's favorites, Internet Explorer automatically searches for this file and places the icon next to all the favorites and quick links originating from your site.

You can also associate the icon with your Web page by saving the icon with a file name other than favicon.ico and adding a line of HTML code in the head section of your Web document. The line of code includes a link tag that specifies the location and name of the file. You can include this link tag on a per-page basis.

<HEAD>
  <LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">
  <TITLE>My Title</TITLE>
</HEAD>
Add the Web Page to the User's Favorites Menu The only way a shortcut icon appears on a user's Favorites menu and Address bar is if the user chooses to add your page as a favorite. You can add a button or link on your page that prompts the user to add your page. Use the following code to experiment with this feature.
<script>
<!--
if ((navigator.appVersion.indexOf("MSIE") > 0)
  && (parseInt(navigator.appVersion) >= 4)) {
    var sText = "<U><SPAN STYLE='color:blue;cursor:hand;'";
    sText += "onclick='window.external.AddFavorite(location.href,";
    sText += "document.title);'>Add this page to your favorites</SPAN></U>";
    document.write(sText);
}
//-->
</SCRIPT>

Share this post


Link to post
Share on other sites

ermm..

good news ..kat mozilla icon kat address bar tu kuar..in the 1st try

bad news ..kat IE7 tak kuar2..ermmm..pening dah...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...