I recently found that when I used ie9 to log on to the csdn blog, a shortcut was prompted at the top of the page. After studying it, I found that a JS was used, downloaded it, and used it, now let's share with you.
First, let's look at several images:
Figure 1 system logon homepage prompt add to Start Menu
After you click "add,
Figure 2 dialog box
After adding the file, go to the Start menu to view it.
Figure 3 has been added to the Start Menu
The following describes the implementation steps:
1. Create a JS file named ie9sitemode. js with the following content:
VaR static_host = 'HTTP: // static.blog.csdn.net '; var home_host = 'HTTP: // blog.csdn.net'; $ (function () {If (supportsitemode ()) {// Add ie9 special head set _ header (); // determine whether the website has been fixed if (window. external. msissitemode () {Get _ articles (); setinterval ("Get _ articles ()", 30000 );} else {// Add the current URL to the Start Menu show _ addbutton () ;}}); function set _ header () {var S1 = '<LINK rel = "shortcut icon" type = "image/X-icon" href = "' + Static_host + '/images/icon/csdn_48.ico "/>'; var S2 = '<meta name =" Application-name "content =" csdn. net "/> '; var S3 =' <meta name =" msapplication-tooltip "content =" csdn. net-the world's largest Chinese IT community "/> '; var S4 =' <meta name =" msapplication-task "content =" name = csdn forum; action-uri = http://community.csdn.net/;icon-uri=' + static_host + '/images/icon/bbs_24.ico "/>'; var S5 = '<meta name =" msapplication-task "Conte Nt = "name = csdn blog; action-uri = http://blog.csdn.net/;icon-uri#' + static_host + '/images/icon/blog_24.ico"/>'; $ ('head '). append ($ (S1 )). append ($ (S2 )). append ($ (S3 )). append ($ (S4 )). append ($ (S5);} function show _ addbutton () {var DIV = document. createelement ('div '); Div. style. position = 'absolute '; Div. style. left = '0px '; Div. style. top = '0px '; Div. style. display = 'block'; Div. style. width = '000000'; Div. st YLE. height = '26px '; Div. style. backgroundcolor = '# ffffdd'; Div. style. textalign = 'center'; Div. style. borderbottom = 'solid 1px # CCC '; Div. innerhtml = '<span style = "font-size: 14px; font-family: ;"> Add the csdn homepage to your Start Menu for quick access. </Span> '+' <input type = "button" value = "add" style = "font-size: 12px; width: 40px;" onclick = "window. external. msaddsitemode (); "/> '+' <a style =" float: Right; margin:-20px 10px 0 0; found-weight: bold; font-family: verdana; "Title =" close "href =" javascript: void (0); "onclick =" javascript: This. parentnode. style. display = \ 'None \ '; return false; "> x </a>'; document. body. appendchild (DIV);} var art _ IDs = ''; function get _ arti Cles () {$. getscript (home_host + '/article/newesthome.html? Top = 2 & callback = show _ articles ');} function show _ articles (RET) {var IDs = ''; For (VAR I = 0; I <ret. length; I ++) {IDs + = (Ret [I]. ID);} If (IDs & Art _ IDs! = IDs) {art _ IDs = IDs; window. external. mssitemodeclearjumplist (); // creates a window for a custom column. external. mssitemodecreatejumplist ('latest recommended files'); For (VAR I = 0; I <ret. length; I ++) {// Add an entry window for the column. external. mssitemodeaddjumplistitem (Ret [I]. title, RET [I]. URL, static_host + "/images/icon/flag_red_48.ico");} // display the window of this topic. external. mssitemodeshowjumplist (); // change the taskbar icon // window. external. mssitemodeseticonoverlay ('', 'title'); // The window is blinking. external. mssitemodeactivate () ;}} function supportsitemode () {try {return ('msissitemode' in window. external) ;}catch (ERR) {return false ;}}
2. Add two JS files in the header of your login page to reference jquery and JS above, as shown in the following figure (modify the JS storage path based on your actual situation ):
<script src="Js/jquery-1.4.1.min.js" type="text/javascript"></script><script src="Js/ie9sitemode.js" type="text/javascript"></script>
PS: the connection address and description text in the ie9sitemode. js file can be modified as needed.