Ajax List,工作但需要调整 [英] Ajax List, Working but need to tweak

查看:47
本文介绍了Ajax List,工作但需要调整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我使用以下函数来执行国家/地区ajax下拉列表。

Hi,

I am using the following function to do a country/region ajax drop down list.

展开 | 选择 | Wrap | 行号

推荐答案

您需要在第二个选择元素中添加一个onchange,它将生成另一个Ajax请求以获取城市,或者您可以加载城市当你更改区域时。
You will need to add an onchange to the second select element which will either make another Ajax request to get the cities or you could load the cities when you change the region.





是的我已经完成了这个但我需要复制上面的javascript函数才能做到这一点但是不要我不知道要改变哪些比特这样就不会使用相同的变量等。


干杯,

Adam
Hi,

Yes i have done this but i need to duplicate the javascript function above to do this but don''t know which bits to change to make it so it is not using the same variables etc.

Cheers,
Adam


它'' s区域您希望用更通用的东西替换。


在parseResponse()中使用字符串作为参数的名称。
It''s "region" that you want to replace with something more generic.

Use a string as an argument in parseResponse() for the name of the select element.


这篇关于Ajax List,工作但需要调整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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