【www.gdgbn.com--网页配色】
<script type="text/网页特效">
function at_display(x)
{
var win = window.open();
for (var i in x) win.document.write(i+" = "+x[i]+"
");
}
// ***** dropdown box **********************************************************
var at_timeout = 50;
// ***** show aux *****
function at_show_aux(parent, child)
{
var p = document.getelementbyid(parent);
var c = document.getelementbyid(child);
p.classname = "active";
if (c.offsetwidth <= 0)
{
c.style.position = "absolute";
c.style.visibility = "visible";
c.style.display = "block";
}
var direction = undefined;
if (p.parentnode && p.parentnode["at_position"] == "x")
direction = p.parentnode["at_direction"];
var top = (c["at_position"] == "y") ? p.offsetheight : 0;
var left1 = (c["at_position"] == "x") ? p.offsetwidth : 0;
var left2 = (c["at_position"] == "x") ? -c.offsetwidth : 0;
var left3 = (c["at_position"] == "x") ? p.offsetwidth : 0;
for (; p; p = p.offsetparent)
{
if (p.style.position != "absolute")
{
left1 += p.offsetleft;
left2 += p.offsetleft;
top += p.offsettop;
}
left3 += p.offsetleft;
}
if (direction)
{
left = (direction == "right") ? left1 : left2;
c["at_direction"] = direction;
}
else
{
left = (left3+c.offsetwidth < document.body.offsetwidth) ? left1 : left2;
c["at_direction"] = (left3+c.offsetwidth < document.body.offsetwidth) ? "right" : "left";
}
c.style.position = "absolute";
c.style.visibility = "visible";
c.style.display = "block";
c.style.top = top +"px";
c.style.left = left+"px";
}
// ***** hide aux *****
function at_hide_aux(parent, child)
{
document.getelementbyid(parent).classname = "parent";
document.getelementbyid(child ).style.visibility = "hidden";
document.getelementbyid(child ).style.display = "block";
}
// ***** show *****
function at_show(e)
{
var p = document.getelementbyid(this["at_parent"]);
var c = document.getelementbyid(this["at_child" ]);
at_show_aux(p.id, c.id);
cleartimeout(c["at_timeout"]);
}
// ***** hide *****
function at_hide()
{
var c = document.getelementbyid(this["at_child"]);
c["at_timeout"] = settimeout("at_hide_aux(""+this["at_parent"]+"", ""+this["at_child" ]+"")", at_timeout);
}
// ***** attach *****
function at_attach(parent, child, position)
{
p = document.getelementbyid(parent);
c = document.getelementbyid(child );
p["at_child"] = c.id;
c["at_child"] = c.id;
p["at_parent"] = p.id;
c["at_parent"] = p.id;
c["at_position"] = position;
p.onmouseo教程ver = at_show;
p.onmouseout = at_hide;
c.onmouseover = at_show;
c.onmouseout = at_hide;
}
// ***** dropdown menu *********************************************************
// ***** build aux *****
function dhtmlmenu_build_aux(parent, child, position)
{
document.getelementbyid(parent).classname = "parent";
document.write("");
var n = 0;
for (var i in child)
{
if (i == "-")
{
document.getelementbyid(parent).href = child[i];
continue;
}
if (typeof child[i] == "object")
{
document.write(""+i+"");
dhtmlmenu_build_aux(parent+"_"+n, child[i], "x");
}
else document.write(""+i+"");
n++;
}
document.write("");
at_attach(parent, parent+"_child", position);
}
// ***** build *****
function dhtmlmenu_build(menu)
{
for (var i in menu) dhtmlmenu_build_aux(i, menu[i], "y");
}</script>
home
downloads
ps教程" href="javascript:alert("tips" );"> tips
products >>
<script type="text/javascript">
var submenu_samples = { "-" : "javascript:alert("samples");",
" sample 1" : "javascript:alert("sample 1");",
" sample 2" : "javascript:alert("sample 2");",
" sample 3" : "javascript:alert("sample 3");" };
var submenu_product2 = { "-" : "javascript:alert("product 2");",
" description" : "javascript:alert("description");",
" samples >>"
: submenu_samples,
" purchage" : "javascript:alert("purchage");" };
var submenu_products = { " product 1" : "javascript:alert("product 1");",
" product 2 >>"
: submenu_product2,
" product 3" : "javascript:alert("product 3");" };
var menu = { "sample1_products" : submenu_products };
dhtmlmenu_build(menu);
</script>
some text goes here...
some text goes here...
home
products
downloads
tips
<script type="text/javascript">
var submenu_samples = { "-" : "javascript:alert("samples");",
" sample 1" : "javascript:alert("sample 1");",
" sample 2" : "javascript:alert("sample 2");",
" sample 3" : "javascript:alert("sample 3");" };
var submenu_product2 = { "-" : "javascript:alert("product 2");",
" description" : "javascript:alert("description");",
" samples" : submenu_samples,
" purchage" : "javascript:alert("purchage");" };
var submenu_products = { " product 1" : "javascript:alert("product 1");",
" product 2" : submenu_product2,
" product 3" : "javascript:alert("product 3");" };
var menu = { "sample2_products" : submenu_products };
dhtmlmenu_build(menu);
</script>
some text goes here...
some text goes here...
some text goes here...
some text goes here...
some text goes here...
some text goes here...
some text goes here...
some text goes here...
some text goes here...