How to switch the logon window by clicking text in JavaScript _ javascript skills

Source: Internet
Author: User
This article mainly introduces how to switch the logon window by clicking text in JavaScript, and involves javascript operations on the div layer and related style skills, for more information about how to switch the logon window by clicking text in JavaScript, see the example in this article. Share it with you for your reference. The specific analysis is as follows:

This is an animation switching layer window effect. clicking different login users will switch to different login windows. the content in the window may be different and is a practical code.

 JAVASCRIPT timely switch logon windowScript var temp_num = null; var now_num = null; var the_top = 130; var the_bottom = 150 var no_can_do = false; function Show_menu (u_num, d_num) {event. srcElement. className = "out2"; if (no_can_do) {return;} now_num = d_num; if (temp_num) {if (document. getElementById ("menu _" + temp_num ). doing) {clearInterval (document. getElementById ("menu _" + temp_num ). doing) ;}} else {temp_num = u_num;} document. getElementById ("menu _" + temp_num ). doing = setInterval ("set_menu ()", 10);} function set_menu () {no_can_do = true; document. getElementById ("form _" + temp_num ). style. display = "none"; var if_move = document. getElementById ("p _" + temp_num ). style. pixelHeight-6; if (if_move> 1) {document. getElementById ("p _" + temp_num ). style. pixelHeight = if_move;} else {document. getElementById ("p _" + temp_num ). style. pixelHeight = 1; var if_stop = document. getElementById ("menu _" + temp_num ). style. pixelTop-1; if (if_stop> the_top) {document. getElementById ("menu _" + temp_num ). style. pixelTop = if_stop; document. getElementById ("menu _" + now_num ). style. pixelTop + = 1;} else {document. getElementById ("menu _" + temp_num ). style. pixelTop = the_top; document. getElementById ("menu _" + now_num ). style. pixelTop = the_bottom; var if_end = document. getElementById ("p _" + now_num ). style. pixelHeight + 6; if (if_end <182) {document. getElementById ("p _" + now_num ). style. pixelHeight = if_end} else {document. getElementById ("p _" + now_num ). style. pixelHeight = 182; clearInterval (document. getElementById ("menu _" + temp_num ). doing); document. getElementById ("menu _" + temp_num ). doing = false; document. getElementById ("form _" + now_num ). style. display = "block"; temp_num = null; no_can_do = false ;}}} function returnIT () {event. srcElement. className = "out";} script

Administrator

 

Average User

 

I hope this article will help you design javascript programs.

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.