所以我做了,清除(选中1) removeAttr('selected') 但是没有作用,我进入页面调试,发现1的选中状态已被清除掉,但是页面展示还是选中1的状态
$("#taskType").val('');
$("#taskType").find("option[value='2']").removeAttr('selected');
你要选中值为2的选项的话用$("#taskType").val('2');就可以了,不用removeAttr……
one
two
three
Hello
id="notMe"
P
p class="myClass"
p class="notMyClass"
Contents 1
Contents 2
Hello!
Hello Again
Test Paragraph.
Paraparagraph
Some new text.
Single:SingleMultiple:Multiple, Multiple3
This is just a test.
So is this
And Again
How are you?
87,910
社区成员
224,616
社区内容
加载中
试试用AI创作助手写篇文章吧