我想根据第一个列表值动态选择第二个列表值。 [英] I want to dynamically select second list value based on first list value.

查看:88
本文介绍了我想根据第一个列表值动态选择第二个列表值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了如下表单 -

I have create form as below -

展开 | 选择 | Wrap | 行号

推荐答案

首先注意所有JavaScript都无法直接连接到数据库。


你有两种方法(至少)可以做到这一点:

1.设置全部页面加载期间使用ASP的数组中的IP地址值。在select onchange中,您可以检查哪个值匹配并显示相应的IP。

2.使用Ajax连接到数据库,使用ASP脚本返回要在文本框中显示的IP地址。
Note first of all that JavaScript cannot connect to the database directly.

You have two ways (at least) in which you can do this:
1. set all the IP address values in an array using ASP during page load. In the select onchange, you can check which value matches and display the corresponding IP.
2. Use Ajax to connect to the database using an ASP script which returns the IP address to display in the text box.


我更喜欢使用第二种方法。

请给我连接oracle数据库的代码。我对AJAX知之甚少。我将责备你先生


谢谢和问候,

Vikas
I will prefer to use 2nd method.
Please give me the code for connection to the oracle database. I know very little about AJAX. I shall oblige you sir

Thanks and regards,
Vikas


这里是一个快速的例子来帮助您入门。另请查看本论坛顶部的Offsite Links粘贴帖子中的一些链接,以获取一些有用的初学者教程。
Here''s a quick example to get you started. Also check out some of the links in the Offsite Links sticky thread at the top of this forum for some useful beginner tutorials.


这篇关于我想根据第一个列表值动态选择第二个列表值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆