如何动态填充 facebook 中的下拉框?
我这里有一个问题:我想根据另一个下拉框的选择动态填充一个下拉框!
在主下拉框中,我有一个 onchange= some_JS_function() ,它从我的 sql 服务器获取数据。如果我想要完整的下拉 html 代码并使用 setInnerXHTML() 放置它,那么从我的服务器接收到的部分代码将在新的下拉框中删除。除此之外其他一切都好!
我尝试将选项放入并放在适当的位置。然而,这根本不起作用。
有人可以帮我吗?
谢谢
- 阿山
I have a problem here : I want to dynamically populate a drop down box based on the selection of another drop down box !
in the main drop down box, I have an onchange= some_JS_function() that gets the data from my sql server. if I want to have the whole drop down html code and put it using setInnerXHTML(), then the part of the code received from my server is removed in the new drop down box. apart from that everything else is ok !
i tried to just have the options come in and put them at the appropriate places. however, this is not working at all.
can anyone please help me ?
thanks
-
ahsan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信这就是您所需要的:
http: //remysharp.com/2007/01/20/auto-populate-select-boxes-using-jquery-ajax/
或者如果你只想用 JS 来完成:
I believe this is what you need:
http://remysharp.com/2007/01/20/auto-populating-select-boxes-using-jquery-ajax/
Or if you want to do it with JS only:
我相信这就是我所需要的: FBJS...OnClick 未通过。 DHTML/setInnerXHtml 问题
感谢您的帮助:)
I believe this is what I need : FBJS...OnClick not being passed. DHTML/setInnerXHtml problem
thanks for helping :)