function Showtips Tutorial (tips, height, time) {
var windowwidth = document.documentelement.clientwidth;
var tipsdiv = ' <div class= ' tipsclass ' > ' + tips + ' </div> ';
$ (' body '). Append (Tipsdiv);
$ (' Div.tipsclass '). CSS ({
' Top ': Height + ' px ',
' Left ': (WINDOWWIDTH/2)-(Tips.length * 13/2) + ' px ',
' Position ': ' absolute ',
' Padding ': ' 3px 5px ',
' Background ': ' #8fbc8f ',
' font-size ': + ' px ',
' Margin ': ' 0 auto ',
' Text-align ': ' Center ',
' Width ': ' Auto ',
' Color ': ' #fff ',
' Opacity ': ' 0.8 '
). Show ();
settimeout (function () {$ (' Div.tipsclass '). fadeout ();}, (Time * 1000));
}
Method Two
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> Untitled Document </title>
<mce:script language= "Web Effects" type= "Text/javascript" ><!--
function Toggle (Targetid) {
if (document.getElementById)
{
Target=document.getelementbyid (Targetid);
if (target.style.display== "block")
{
Target.style.display= "None";
var aaa =document.all ("AA");
var s= ';
for (Var i=0;i<aaa.length;i++)
{
if (aaa[i].checked==true)
{
S+=aaa[i].value;
}
}
} else
{
target.style.display= "Block";
}
}
}
--></mce:script>
<mce:style type= "Text/css" ><!--
#div1 {
height:400px;
width:400px;
Display:none;
}
--></mce:style><style type= "Text/css" mce_bogus= "1" >
#div1 {
height:400px;
width:400px;
Display:none;
}</style>
<body>
<input type= "button" id= "Butn" value= "Show/Hide" onclick= "toggle (' Div1 ')"/>
<center>
<div id= "Div1" style= "Filter:alpha" (opacity=100); Position:absolute; overflow:auto;height:160; top:100px2008-5-26;left:300px;width:100px; ">
Hidden Div
</div></center>
Centered Div
</body>
Method Three
<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "<a href=" http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd "target=" _blank "rel=" external ">http://www.w3.org/tr/xhtml1/dtd/" Xhtml1-transitional.dtd</a> ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<TITLE>JEXM ' s blog</title>
<script language= "javascript" type= "Text/javascript" >
<!--
Function Show (Targetid) {
if (document.getElementById) {
Target=document.getelementbyid (Targetid);
if (target.style.display== "block") {
Target.style.display= "None";
newsinfo.style.height= "1528px"
} else {
target.style.display= "Block";
newsinfo.style.height= "1583PX"
}
}
}
-->
</script>
<style type= "Text/css" >
<!--
#test1 {
Display:none;
}
-->
</style>
<body>
<input name= "niming" type= checkbox "onclick=" Show (' test1 ') "checked > Display or not
<div id= "test1" ></div>
</body>