<html>
<head>
<title>businessSell</title>
</head>
<body onLoad="changeDrop2()">
<script LANGUAGE="JavaScript">
function changeDrop2() {
if (document.form.Drop1.selectedIndex == 0) {
document.form.Drop2.length = 1;
document.form.Drop1.selectedIndex = 0
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "No Product Selected";
document.form.Drop2.options[0].value = "No Product Selected";
}
if (document.form.Drop1.selectedIndex == 1) {
document.form.Drop2.length = 9;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select Model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "Celebrity";
document.form.Drop2.options[1].value = "Celebrity";
document.form.Drop2.options[2].text = "Legend";
document.form.Drop2.options[2].value = "Legend";
document.form.Drop2.options[3].text = "Sundancer";
document.form.Drop2.options[3].value = "Sundancer";
document.form.Drop2.options[4].text = "SideKick";
document.form.Drop2.options[4].value = "SideKick";
document.form.Drop2.options[5].text = "Rally";
document.form.Drop2.options[5].value = "Rally";
document.form.Drop2.options[6].text = "Shuttle";
document.form.Drop2.options[6].value = "Shuttle";
document.form.Drop2.options[7].text = "Dynamo";
document.form.Drop2.options[7].value = "Dynamo";
document.form.Drop2.options[8].text = "XL";
document.form.Drop2.options[8].value = "XL";
}
if (document.form.Drop1.selectedIndex == 2) {
document.form.Drop2.length = 8;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "1100";
document.form.Drop2.options[1].value = "1100";
document.form.Drop2.options[2].text = "1103";
document.form.Drop2.options[2].value = "1103";
document.form.Drop2.options[3].text = "1105";
document.form.Drop2.options[3].value = "1105";
document.form.Drop2.options[4].text = "1115";
document.form.Drop2.options[4].value = "1115";
document.form.Drop2.options[5].text = "1120";
document.form.Drop2.options[5].value = "1120";
document.form.Drop2.options[6].text = "1170";
document.form.Drop2.options[6].value = "1170";
document.form.Drop2.options[7].text = "1400";
document.form.Drop2.options[7].value = "1400";
}
if (document.form.Drop1.selectedIndex == 3) {
document.form.Drop2.length = 12;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select Model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "TMR48";
document.form.Drop2.options[1].value = "TMR48";
document.form.Drop2.options[2].text = "TMR49";
document.form.Drop2.options[2].value = "TMR49";
document.form.Drop2.options[3].text = "TMR348";
document.form.Drop2.options[3].value = "TMR348";
document.form.Drop2.options[4].text = "TMR329";
document.form.Drop2.options[4].value = "TMR329";
document.form.Drop2.options[5].text = "TMR540";
document.form.Drop2.options[5].value = "TMR540";
document.form.Drop2.options[6].text = "TMR360";
document.form.Drop2.options[6].value = "TMR360";
document.form.Drop2.options[7].text = "TMR470";
document.form.Drop2.options[7].value = "TMR470";
document.form.Drop2.options[8].text = "TMR570/571";
document.form.Drop2.options[8].value = "TMR570/571";
document.form.Drop2.options[9].text = "TMR580";
document.form.Drop2.options[9].value = "TMR580";
document.form.Drop2.options[10].text = "TMR670";
document.form.Drop2.options[10].value = "TMR670";
document.form.Drop2.options[11].text = "TMR560";
document.form.Drop2.options[11].value = "TMR560";
}
if (document.form.Drop1.selectedIndex == 4) {
document.form.Drop2.length = 3;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select Model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "Wrangler";
document.form.Drop2.options[1].value = "Wrangler";
document.form.Drop2.options[2].text = "Hurricane";
document.form.Drop2.options[2].value = "Hurricane";
}
if (document.form.Drop1.selectedIndex == 5) {
document.form.Drop2.length = 3;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select Model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "2000";
document.form.Drop2.options[1].value = "2000";
document.form.Drop2.options[2].text = "3000";
document.form.Drop2.options[2].value = "3000";
}
}
function goThere() {
if (document.form.Drop1.selectedIndex == 0) {
alert("Please Select a Product");
} else {
if (document.form.Drop2.selectedIndex == 0) {
alert("Please Select a Model");
} else {
var list1 = document.form.Drop1;
var list2 = document.form.Drop2;
var theDIR = list1.options[list1.selectedIndex].value;
var theProduct = document.form.Drop2.options[list2.selectedIndex].value;
location.href = "
http://www.YourLinkHere.com/
" + theDIR + "/" + theProduct + ".htm";
}
}
}
</script>
<form name="form">
<p><select name="Drop1" onChange="changeDrop2()" size="1">
<option selected value="Select A Product">Select A Product</option>
<option value="Scooters">Scooters</option>
<option value="Jazzy">Jazzy</option>
<option value="LiftChairs">Lift Chairs</option>
<option value="PMVs">PMV's</option>
<option value="Hercules">Hercules</option>
</select><br>
<select name="Drop2" size="1">
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
</select><br>
<input type="button" onClick="goThere()" value="GOTO Product Page" name="B1"></p>
</form>
<xmp>
<html>
<head>
<title>businessSell</title>
</head>
<body onLoad="changeDrop2()">
<script LANGUAGE="JavaScript">
function changeDrop2() {
if (document.form.Drop1.selectedIndex == 0) {
document.form.Drop2.length = 1;
document.form.Drop1.selectedIndex = 0
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "No Product Selected";
document.form.Drop2.options[0].value = "No Product Selected";
}
if (document.form.Drop1.selectedIndex == 1) {
document.form.Drop2.length = 9;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select Model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "Celebrity";
document.form.Drop2.options[1].value = "Celebrity";
document.form.Drop2.options[2].text = "Legend";
document.form.Drop2.options[2].value = "Legend";
document.form.Drop2.options[3].text = "Sundancer";
document.form.Drop2.options[3].value = "Sundancer";
document.form.Drop2.options[4].text = "SideKick";
document.form.Drop2.options[4].value = "SideKick";
document.form.Drop2.options[5].text = "Rally";
document.form.Drop2.options[5].value = "Rally";
document.form.Drop2.options[6].text = "Shuttle";
document.form.Drop2.options[6].value = "Shuttle";
document.form.Drop2.options[7].text = "Dynamo";
document.form.Drop2.options[7].value = "Dynamo";
document.form.Drop2.options[8].text = "XL";
document.form.Drop2.options[8].value = "XL";
}
if (document.form.Drop1.selectedIndex == 2) {
document.form.Drop2.length = 8;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "1100";
document.form.Drop2.options[1].value = "1100";
document.form.Drop2.options[2].text = "1103";
document.form.Drop2.options[2].value = "1103";
document.form.Drop2.options[3].text = "1105";
document.form.Drop2.options[3].value = "1105";
document.form.Drop2.options[4].text = "1115";
document.form.Drop2.options[4].value = "1115";
document.form.Drop2.options[5].text = "1120";
document.form.Drop2.options[5].value = "1120";
document.form.Drop2.options[6].text = "1170";
document.form.Drop2.options[6].value = "1170";
document.form.Drop2.options[7].text = "1400";
document.form.Drop2.options[7].value = "1400";
}
if (document.form.Drop1.selectedIndex == 3) {
document.form.Drop2.length = 12;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select Model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "TMR48";
document.form.Drop2.options[1].value = "TMR48";
document.form.Drop2.options[2].text = "TMR49";
document.form.Drop2.options[2].value = "TMR49";
document.form.Drop2.options[3].text = "TMR348";
document.form.Drop2.options[3].value = "TMR348";
document.form.Drop2.options[4].text = "TMR329";
document.form.Drop2.options[4].value = "TMR329";
document.form.Drop2.options[5].text = "TMR540";
document.form.Drop2.options[5].value = "TMR540";
document.form.Drop2.options[6].text = "TMR360";
document.form.Drop2.options[6].value = "TMR360";
document.form.Drop2.options[7].text = "TMR470";
document.form.Drop2.options[7].value = "TMR470";
document.form.Drop2.options[8].text = "TMR570/571";
document.form.Drop2.options[8].value = "TMR570/571";
document.form.Drop2.options[9].text = "TMR580";
document.form.Drop2.options[9].value = "TMR580";
document.form.Drop2.options[10].text = "TMR670";
document.form.Drop2.options[10].value = "TMR670";
document.form.Drop2.options[11].text = "TMR560";
document.form.Drop2.options[11].value = "TMR560";
}
if (document.form.Drop1.selectedIndex == 4) {
document.form.Drop2.length = 3;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select Model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "Wrangler";
document.form.Drop2.options[1].value = "Wrangler";
document.form.Drop2.options[2].text = "Hurricane";
document.form.Drop2.options[2].value = "Hurricane";
}
if (document.form.Drop1.selectedIndex == 5) {
document.form.Drop2.length = 3;
document.form.Drop2.selectedIndex = 0
document.form.Drop2.options[0].text = "Select Model";
document.form.Drop2.options[0].value = "Select Model";
document.form.Drop2.options[1].text = "2000";
document.form.Drop2.options[1].value = "2000";
document.form.Drop2.options[2].text = "3000";
document.form.Drop2.options[2].value = "3000";
}
}
function goThere() {
if (document.form.Drop1.selectedIndex == 0) {
alert("Please Select a Product");
} else {
if (document.form.Drop2.selectedIndex == 0) {
alert("Please Select a Model");
} else {
var list1 = document.form.Drop1;
var list2 = document.form.Drop2;
var theDIR = list1.options[list1.selectedIndex].value;
var theProduct = document.form.Drop2.options[list2.selectedIndex].value;
location.href = "
http://www.YourLinkHere.com/
" + theDIR + "/" + theProduct + ".htm";
}
}
}
</script>
<form name="form">
<p><select name="Drop1" onChange="changeDrop2()" size="1">
<option selected value="Select A Product">Select A Product</option>
<option value="Scooters">Scooters</option>
<option value="Jazzy">Jazzy</option>
<option value="LiftChairs">Lift Chairs</option>
<option value="PMVs">PMV's</option>
<option value="Hercules">Hercules</option>
</select><br>
<select name="Drop2" size="1">
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
<option value=" ">-----------------------------</option>
</select><br>
<input type="button" onClick="goThere()" value="GOTO Product Page" name="B1"></p>
</form>
</body>
</html>
</xmp>
</body>
</html>
发表评论
-
jquery-validate学习
2010-05-19 16:40 2410一、用前必备官方网站:http://bassistance.d ... -
JS时间比较(是否是大于当前时间,格式yy-MM-dd)
2009-05-28 16:04 8718//获取当前格式化后的时间 function getNo ... -
javascript Date日期对象
2009-05-28 15:31 1136创建一个日期对象: var objDate=new ... -
js分页的工具
2009-04-16 22:09 863js分页工具 -
js中select 中options的属性
2009-03-03 08:01 9587Select 选择区(下拉菜单、列表)对象 由“< ... -
javascript中利用split将字符串分成字符应用
2009-03-02 19:31 1306<script type="text/java ...
相关推荐
JavaScript级联菜单是一种常见的网页交互元素,用于呈现层次结构的数据,如导航菜单、下拉选项等。这种菜单在用户界面上提供了高效的导航,允许用户通过展开和折叠子菜单来探索多级内容。在这个主题中,我们将深入...
在JavaScript的世界里,级联菜单(Cascading Menu)是一种常见的交互设计,它通常用于下拉选择框,其中的选择项会根据用户先前的选择动态改变。本示例将深入讲解如何利用jQuery库来实现这种功能。jQuery是JavaScript...
总结,js和html编写的级联菜单结合了前端和后端的技术,通过JavaScript实现了动态交互和数据获取,HTML提供了结构基础,而数据库则为菜单提供了数据源。这种技术组合使得网页可以提供丰富的交互性和实时性,极大地...
级联菜单的工作原理是基于客户端的javascript脚本和服务器端的数据库交互。用户选择了一个选项,然后javascript脚本将该选项的值传递给服务器,服务器端的脚本将根据该值从数据库中查询相关数据,并将其返回给客户端...
js 级联菜单例子,简单实用
在本项目"jsp+db的js级联菜单"中,我们看到它利用了Java Server Pages (JSP) 和 JavaScript 技术,并结合数据库来动态生成级联菜单。 JSP是Java的一种视图技术,用于在服务器端生成HTML或其他类型的Web内容。开发者...
通过上述步骤,我们已经了解了如何使用JSP技术和JavaScript实现一个简单的级联菜单功能。这种方法不仅适用于简单的省份-城市选择器,还可以扩展到更复杂的多级选择器中。开发者可以根据具体需求调整和优化实现细节,...
javascript实现省市级联菜单的效果
在JavaScript(JS)中,级联菜单是一种常见的交互设计元素,常见于网站的导航栏,用于展示多级分类。级联菜单允许用户在一个下拉菜单中选择多个层次的选项,通常伴随着点击事件来展开或收起子菜单。下面将详细介绍...
在Web开发中,级联菜单通常用HTML、CSS和JavaScript实现。HTML负责定义菜单结构,CSS控制样式,JavaScript处理交互逻辑。例如,可以使用`<ul>`和`<li>`标签创建一个多级的无序列表,然后通过CSS的`display`属性控制...
在网页设计中,级联菜单(Cascading Menu)是一种常见的交互元素,它通常用于组织大量分类信息,如本例中的全国省市结构。利用JavaScript(JS)可以方便地实现这种功能,提供用户友好的交互体验。下面将详细介绍如何...
在“菜单 menu JavaScript css js div 下拉级联菜单”这个话题中,`div` 是HTML中的一个常用元素,常用来作为容器来组织页面内容。在这个场景中,`div`被用作构建菜单结构的基本单元,每个菜单项可能是一个`div`元素...
用js实现三级级联,('s1','s2')"> 请选择</option> <option value="A" >A</option> <option value="B">B</option> ('s2','s3')"> 请选择</option> <select id="s3"> 请选择</option> </select>
JavaScript是实现异步级联菜单的主要编程语言,负责处理用户交互、DOM(文档对象模型)操作以及AJAX请求的发送和响应处理。在"AjaxMultiMenu.html"页面中,JavaScript代码会监听用户的点击事件,当用户选择一个菜单...
在本例中,我们讨论的是通过JavaScript实现的二级级联菜单,即在一个文本框的选择会影响到另一个文本框的可选项。 一、级联菜单的基本概念 级联菜单由多个层次的菜单项构成,通常表现为一个菜单项展开后显示下一级...
AJAX(Asynchronous JavaScript and XML)技术可以有效地实现级联菜单的动态加载和交互,无需刷新整个页面即可获取并显示数据。 **AJAX** 是一种在不重新加载整个网页的情况下,与服务器交换数据并更新部分网页的...
常见的JavaScript库如jQuery、Vue.js、React.js等都有相应的组件或插件支持级联菜单的创建。 5. **数据绑定**:级联菜单的数据通常来自服务器,可以通过Ajax或Fetch API进行异步获取。数据结构一般包含节点ID、父...
在本项目中,Ajax被用来实现级联菜单的效果,即一个下拉菜单的选择会影响另一个下拉菜单的内容,这种交互方式常见于数据层级关系丰富的表单中。下面将详细介绍Ajax实现级联菜单的相关知识点。 1. **异步通信**: ...
本教程将探讨如何使用JavaScript实现注册验证以及级联菜单的功能,这些技术对于创建一个高效且用户体验良好的网页至关重要。 首先,让我们详细了解一下注册验证。注册验证是为了确保用户在创建账户时输入的信息是...
标题中的“三级级联菜单(JS+HTML)”指的是在网页设计中使用JavaScript和HTML实现的具有三级结构的下拉菜单。这种菜单允许用户通过点击主菜单项来展开子菜单,进一步点击子菜单项可以展开更深层次的选项,提供了一种...