JavaScript closed-pack function _javascript techniques for explicit implicit content

Source: Internet
Author: User
Tags pack
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" > <HTML> <HEAD> <TITLE> New Document &L t;/title> <meta name= "generator" content= "EditPlus" > <meta name= "Author" content= "" > <meta NAME= "Key Words "content=" "> <meta name=" Description "content=" "> <style type= ' text/css ' > a{width:200px; font-size:12px; Font-weight:bold; height:30px; line-height:30px; Background:url (/images/default/header_bg.gif); margin-top:5px; }. a a{text-decoration:none; . aa{width:200px; height:100px; BORDER:3PX Groove #91D2FF; Display:none; </style> </HEAD> <BODY> <div id= "A" title= "A1" class= ' a ' > + click Show </div> <div id= "A1" class= ' AA ' > Love worry-free, my idol is the fruit of love worry-free, my idol is the fruit </div> <div id= "B" title= "B1" class= ' a ' > + click Show ;/div> <div id= "B1" class= ' AA ' > Love worry-free, fruit I adore you love worry, fruit I adore you </div> <div id= "C" title= "C1" Class= ' a ' ; + Click to show </div> <div id= "C1" class= ' AA ' > Love worry-free, daily attention to idol love worry, daily attention to idol </div> <div id= "D" title= "D1" class= ' a ' > + click Show </div> <div id= "d1" class= ' AA ' > Love without Worry, love fruit, love fruit </div> <script language= "JavaScript" > <!--var each=function (A,FN) {for (Var i=0;i<a.length;i++) Fn.call (a[i],i,a)} var $=function (s) {return s.charat?d Ocument.getelementbyid (s):(typeof (s) = = ' object ') s:null;} var show=function (obj) {var divs=[$ (obj), ']; return function () {Divs.unshift ($ (this.title)); divs.length=2; $ (this.title). style.display= ' block '; Try{divs[1].style.display= ' None '}catch (e) {}}} window.onload=function () {var show = Show (' A1 '); Each (document.getElementsByTagName (' div '), function (a,b) {if (this.classname== ' a ') {this.onclick=show; }}}//--> </SCRIPT> </BODY> </HTML>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

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.