84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
人生最曼妙的风景,竟是内心的淡定与从容!
理论上不会出现~$("select").html("").val("");试一下这个.
$("select").html("").val("");
或者既然都清空了, 可以直接remove掉, 在生成一个也可以.
下面代码我测试一下清空select没问题~
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <script src="jquery.min.js"></script> </head> <body> <select name="" id="select"></select> <button class="dianwo">dianwo</button> <script> $(function(){ $("select").append("<option value='123'>123</option><option value='456'>456</option><option value='789'>789</option>"); $(".dianwo").click(function(){ $("select").html(""); }) }); </script> </body> </html>
理论上不会出现~
$("select").html("").val("");
试一下这个.
或者既然都清空了, 可以直接remove掉, 在生成一个也可以.
下面代码我测试一下清空select没问题~