This article mainly introduces how to implement the banner toolbar code on the top of alimama website with the function of Disabling JavaScript, which can realize floating display of the banner window on the top and hide the function on the top. It has some reference value, for more information about how to use JavaScript to implement the banner tool bar code on the top of alimama website with the function of disabling, see the example below. Share it with you for your reference. The details are as follows:
This is a banner code on the top of alimama's website. It is slide out. A classic tool bar code can be used as a menu. It also provides comprehensive functions to close the tool bar in due time, the overall design is elegant and concise.
The running effect is as follows:
The Online Demo address is as follows:
Http://demo.jb51.net/js/2015/js-top-float-banner-alimama-style-codes/
The Code is as follows:
Banner code on top of alimama website
Php, asp.net, javascript, jquery, vbscript, dos batch processing, web page creation, network programming, website construction, and other programming materials are provided by the script home.Details>Script var is_home_tx_show = false; var p_home_tx = document. getElementById ("home_tx"); var p_home_tx_in = document. getElementById ("home_tx_in"); var stepms = 10; function home_tx_show () {home_tx_stepshow ();} function home_tx_stepshow () {var curHeight = parseInt (p_home_tx.offsetHeight ); if (curHeight> = 37) {is_home_tx_show = true;} else {p_home_tx.style.height = (curHeight + 4) + "px"; p_home_tx_in.style.top = (parseInt (bytes) + 4) + "px"; window. setTimeout (home_tx_stepshow, 30) ;}} function home_tx_hide () {if (is_home_tx_show) {home_tx_stephen IDE ()} else {window. setTimeout (home_tx_stephen IDE, 1200) ;}} function home_tx_stephen () {var curHeight = parseInt (p_home_tx.style.height); if (curHeight <= 0) {is_home_tx_show = false ;} else {try {p_home_tx.style.height = (curHeight-4) + "px"; p_home_tx_in.style.top = (parseInt (p_home_tx_in.style.top)-4) + "px"; window. setTimeout (home_tx_stephen IDE, 30);} catch (e) {}} if (window. addEventListener) {window. addEventListener ("load", home_tx_show, false);} else {window. attachEvent ("onload", home_tx_show);} script
I hope this article will help you design JavaScript programs.