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
I hope this article will help you design javascript programs.