...">

jquery set selected select option; doesn't work for dynamically added option but does for static ones

Here is what I have that properly populates the select list: The population works great, but calling .val() on one of the option elements added by the script does not make it selected, but as an example, the statically defined option "500" works fine when I call .val() on it. I'm fairly new to jquery, but not programming, as I make my way into browser programming. Any tips would be useful. What else do you need? This script code is sitting directly inside a table td tag so the select is populated and set as the form is rendered.

以上就是jquery set selected select option; doesn't work for dynamically added option but does for static ones的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏