开发者

Add <options> dynamically to HTML <select> tag in Jquery UI dialog widget

I require to add options dynamically to drop down menu in a jquery ui dialog. My code is in php so i'll have to pass the variables to javascript function for jq开发者_StackOverflow中文版uery and use these values to make the drop down list. How do I do that?


  1. Send the options out of PHP as an array or JSON decoded data
  2. In Javascript when you create a dialog box you can run a function on dialog open. Use this as an opportunity to populate options.
  3. Select the /select box/ element and append select box with options.

If need help visit this post

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜