Html css style Integration

Source: Internet
Author: User
1. Show the article: Empty two cells <P style = "text-indent: 2em"> ishide sent </P> 2. Scroll announcement of navigation content:

<Script language = JavaScript>
VaR eventsdesc = new array ();
VaR eventsurl = new array ();
VaR sysnotice = '<s: property value = "# request. sysnoticelist"/> ';
<S: iterator value = "# request. sysnoticelist" status = "IND">
Eventsdesc ['<s: property value = "# ind. index "/> '] =' <s: property value =" # request. sysnoticelist [# ind. index]. noticetitle "/> ';
VaR id = '<s: property value = "# request. sysnoticelist [# Ind. Index]. sysnoticeid"/> ';
Id = 'shownotice (\ ''+ ID + '\');';
Eventsurl ['<s: property value = "# Ind. Index"/>'] = ID;
</S: iterator>
VaR NO = 0, etleftmargin = 580, etmainwidth = 750;
VaR eventstickerid, isnavrunning = false;
VaR isnav = (navigator. appname. indexof ("Netscape ")! =-1 );

Function initarray (){
This. Length = initarray. Arguments. length;
For (VAR I = 0; I <this. length; I ++ ){
This [I] = initarray. Arguments [I];
}
}
If (isnav ){
VaR x = etleftmargin + math. Floor (window. outerwidth-etmainwidth)/2 );
X = (x <etleftmargin )? Etleftmargin: X;
}
If (isnav ){
VaR DESC = '<layer id = "WDS" Top = 130 left =' + x + 'width = 150> </layer>'
Document. getelementbyid ("notice"). innerhtml = DESC;
} Else {
VaR DESC = '<span id = "WDS"> </span> ';
Document. getelementbyid ("notice"). innerhtml = DESC;
}
Function hresetx (e ){
If (isnav ){
// Isnavrunning = false;
X = etleftmargin + math. Floor (window. outerwidth-etmainwidth)/2 );
X = (x <etleftmargin )? Etleftmargin: X;
Document. WDS. Left = X;
// Window. Reload ();
}
}
Function hload (e ){
If (! Isnavrunning ){
Isnavrunning = true;
Eventstickerid = setTimeout ("eventsticker ();", 500 );
}
If (isnav ){
Window. captureevents (event. Resize );
Window. onresize = hresetx;
}
}
Function eventsticker (){
Desc = "<span style = \" cursor: pointer; width: 50px; Height: 25px; \ "onclick = \" "+ eventsurl [No] +" \ ">" + eventsdesc [No] + "</span> ";
If (isnav ){
Document.wds.doc ument. Write (DESC );
Document.wds.doc ument. Close ();
} Else {
WDS. innerhtml = DESC;
}
No = (NO> = eventsdesc. Length-1 )? 0: ++ no;
Eventstickerid = setTimeout ("eventsticker ();", 2000 );
Alert (NO + "=" + eventsdesc. Length );
}
// Eventsticker ();
// Eventstickerid = setTimeout ("eventsticker ();", 200 );
// Catch the events for my own handler
If (document. Layer) window. captureevents (event. load );
Window. onload = hload;
// -->
</SCRIPT>

 

Article format display:

<Table width = "100%" class = "table_tb" style = "table-layout: fixed; Word-break: break-all "border =" 0 "cellspacing =" 0 "cellpadding =" 0 ">
<Tr>
<TD width = "80%" align = "center" >$ {sysnotice. noticetitle} </TD>
</Tr>
<Tr align = "center">
<TD width = "80%" align = "right"> <s: Date name = "sysnotice. sendtime "format =" YYYY mm dd hh: mm "/> </TD>
</Tr>
<Tr>
<TD width = "80%" align = "Left" style = "word-wrap: Break-word; Word-break: normal;">
<PRE> <P style = "text-indent: 2em" >$ {sysnotice. noticecontent} </P> </PRE>
</TD>
</Tr>
</Table>

3. Set var BTN = NULL on the JS webpage;

Function backtop (btnid ){
BTN = Document. getelementbyid (btnid );
VaR d=document.doc umentelement. scrolltop | window. pageyoffset | document. Body. scrolltop;
 
Window. onscroll = set;
BTN. onclick = myscroll;

/** Function (){
BTN. style. Display = "NONE ";
Window. onscroll = NULL;
Setinterval (function (){
D. scrolltop-= math. Ceil (D * 1 );
If (D = 0) clearinterval (BTN. Timer, window. onscroll = set );
},100 );
D. scrolltop-= math. Ceil (D * 1 );
};**/

} Function set () {var d1_document.doc umentelement. scrolltop | window. pageyoffset | document. Body. scrolltop; var STR = D> 0? 'Block': 'none ';
BTN. style. Display = STR; // window. onscroll = NULL;
}
Function myscroll ()
{
// The front side is to get chrome and other general browsers. If the browser cannot get it, it will be Ie, and it will be obtained through IE.
VaR xforwardocument.doc umentelement. scrolltop | window. pageyoffset | document. Body. scrolltop;
VaR timer = setinterval (function (){
X = X-100;
If (X & lt; 100)
{
BTN. style. Display = 'none ';
X = 0;
Window. scrollto (x, x );
Clearinterval (timer );
Window. onscroll = set;
}
Window. scrollto (x, x );
}, "10 ");
}
3. js compression and decompression tool http://js.clicki.cc/4?jquery pop-up box tool ← http://www.zhangxinxu.com

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.