jsp页面中比较常见的问题
- 提问者网友:鼻尖触碰
- 2021-05-22 18:19
- 五星知识达人网友:走死在岁月里
- 2021-05-22 19:45
用ajax技术
或者使用iframe内部框架嵌入的方法即可实现.
- 1楼网友:長槍戰八方
- 2021-05-22 20:17
<html xmlns=" http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <script language="javascript"> function change(){ var id=document.form1.select1.value; var newN1,newN2; swich(id){ case "1": newN1=new Option("苹果"); newN2=new Option("香蕉"); break; case "2": newN1=new Option("鞋"); newN2=new Option("袜子"); break; ...... } document.form1.select2.options.length=0; document.form1.select2.options.add(newN1); document.form1.select2.options.add(newN2);
} </script> </head>
<body> <form id="form1" name="form1" method="post" action=""> 产品代码 <label> <select name="select1" onchange="change()"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> </select> </label> <p>产品名称 <label> <select name="select2"> </select> </label> </p> </form> </body> </html> 大体是这样吧,你看着改改