⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tu9.18.htm

📁 一部非常好的javaScript教程
💻 HTM
字号:
<HTML>
<HEAD>
<TITLE>导航条 Scriptlet</TITLE>
<SCRIPT LANGUAGE = Javascript TYPE="text/javascript">

function option_A()
{
	nav.style.width = "110%";
	nav.style.height = 70;
	textDiv.style.left = "40";
	textDiv.style.top = 245;
	textDiv.style.width = "90%";
	buttonA.style.left = "40";
	buttonB.style.left = "125";
	buttonA.style.top = 205;
	buttonB.style.top = 205;
	nav.setForeColor("#6A5ACD");
	nav.setBackColor("seashell");
	nav.setFont("Arial");
	nav.setFontSize("10pt");
	nav.setFontStyle("normal");
	nav.setWidth("340");
	nav.setHeight("40");
	nav.setLinks("浏览", "Browse.htm", "搜索", "Search.htm", "商店", "Shop.htm", "购物", "Buy.htm", "主页", "Home.htm");
	nav.setOrientation("horizontal");
	nav.setHighLightColor("red");
}

function option_B()
{
	nav.style.width = "90";
	nav.style.height = 300;
	textDiv.style.left = "140";
	textDiv.style.top = 230;
	textDiv.style.width = "60%";
	buttonA.style.left = "140";
	buttonB.style.left = "140";
	buttonA.style.top = 140;
	buttonB.style.top = 175;
	nav.setForeColor("deeppink");
	nav.setBackColor("darkslateblue");
	nav.setFont("Arial");
	nav.setFontSize("10pt");
	nav.setFontStyle("normal");
	nav.setWidth("60");
	nav.setHeight("250");
	nav.setLinks("新闻","news.htm", "体育", "sports.htm", "影视", "movie.htm","旅游",  "local.htm", "广告", "classAds.htm");
	nav.setOrientation("vertical");
	nav.setHighLightColor("white");
}
</SCRIPT>
</HEAD>
<BODY TOPMARGIN=20 LEFTMARGIN="40" BGCOLOR="#FFFFFF" LINK="#000066" VLINK="#666666" TEXT="#000000">
<H2><FONT FACE="楷体_gb2312">导航条</FONT> Scriptlet</H2>
<FONT FACE="隶书" SIZE=2>
  <A HREF="#" ONCLICK="self.close();return false">关闭窗口</A>
</FONT>
<P>
<HR>
<P>
<FONT FACE="黑体" SIZE=2>
<BR>
<OBJECT ID="nav" 
		STYLE="position:absolute;
		width:80%;
		height:100;
		top:120;
		left:0;"
        type="text/x-scriptlet"
		data="navBar.htm">
</OBJECT>
<BUTTON ID=buttonA onclick="option_A()" STYLE="position:absolute; top:120; left:90%">样式 A</BUTTON>
<BUTTON ID=buttonB onclick="option_B()" STYLE="position:absolute; top:155; left:90%">样式 B</BUTTON>
<DIV ID=textDiv STYLE="position:absolute; top:230; left:40; width:90%">
<P><B>相关文本</B>
<P>此文本应相对于导航条的位置移动。在样式 A 中,这些文本位于导航条下方;在样式 B 中,这些文本位于导航条右边。
<P>
</DIV>
</FONT>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -