JS Implementation of Sina Blog left-side Blog management menu effect code _ javascript tips-js tutorial

Source: Internet
Author: User
This article mainly introduces how to implement the Blog management menu effect code on the left side of Sina Blog in JS, and enables the function of dynamically operating page element styles Based on mouse clicks. The interface is elegant, concise, and practical, for more information about how to use JS to implement the Blog management menu on the left of Sina Blog, see the example below. We will share this with you for your reference. The details are as follows:

Here we will introduce the Blog management menu on the left side of Sina Blog. Let's take a look at it. If you are designing a program, it should be appropriate to use this menu in background management. Pictures are called by Sina, if you use a large number of images, it is best to download them to the local computer to avoid any changes to Sina.

The running effect is as follows:

The Online Demo address is as follows:

Http://demo.jb51.net/js/2015/js-sina-blog-left-menu-style-codes/

The Code is as follows:

 Manage menu on the left of Sina BlogScript function $ (_ sId) {return document. getElementById (_ sId);} function exist (_ sId) {var oObj = $ (_ sId); return oObj! = Null? OObj: false;} function dw (_ sTxt) {document. write (_ sTxt);} function hide (_ sId) {$ (_ sId ). style. display = $ (_ sId ). style. display = "none "? "": "None";} function onlyShow (_ sId, _ iNum, _ sPic, _ sTxt1, _ sTxt2) {var I = 0; var oCurr = exist (_ sId + I); while (oCurr) {oCurr. style. display = "none"; $ (_ sPic + I ). src = _ sTxt2; I ++; oCurr = exist (_ sId + I)} $ (_ sId + _ iNum ). style. display = ""; $ (_ sPic + _ iNum ). src = _ sTxt1;} function swapShow (_ sId) {var I = 0; var oCurr = exist (_ sId + I); while (oCurr) {hide (_ sId + I); I ++; oCurr = exist (_ sId + I)} Function seekKey (_ sKey) {var I = 0; while (exist (_ sKey + I) {I ++;} return I;} function swapPic (_ sId, _ sAttr, _ sTxt1, _ sTxt2) {$ (_ sId) [_ sAttr] = $ (_ sId) [_ sAttr]. indexOf (_ sTxt1)>-1? _ STxt2: _ sTxt1;} function swap (_ sId, _ sAttr, _ sTxt1, _ sTxt2) {$ (_ sId) [_ sAttr] = $ (_ sId) [_ sAttr] = _ sTxt1? _ STxt2: _ sTxt1;} function moveGif (_ sId) {swap (_ sId, 'classname', 'marginleft2', '');} function moveStart (_ sId) {_ tmp _ time = setInterval ("moveGif ('" + _ sId + "')", 200);} function moveStop (_ sId) {clearInterval (_ tmp _ time); $ (_ sId ). className = "marginLeft2";} function switchShow () {hide ('left'); swapPic ('arrow', 'src', 'images/control_switch_up.gif ', 'images/control_switch_down.gif '); swapShow ('eleeleft'); swapShow ('hidebody');} function scroll_to_top () {document. body. scrollTop = 0;} function mainFrameRedirect (url) {oo = document. getElementById ("mainFrame"); oo. url = url;} script  
 
 
BLOG article Management
Post BLOG articles
BLOG article Management
BLOG comment Management
BLOG information settings
Change Basic Information
Customize my templates
Homepage content maintenance
Personal information settings
Change Basic Information
Default Logon Options

I hope this article will help you design JavaScript programs.

Related Article

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.