首页 > 语言 > JavaScript > 正文

jquery如何根据值设置默认的选中项

2024-05-06 14:28:24
字体:
来源:转载
供稿:网友
代码如下:
$("#objtype option[value='{$_GET[objtype]}']").attr("selected",true);
$("#charttype option[value='{$_GET[charttype]}']").attr("selected",true);
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选