$()是有两个参数,第一个是选择器,第二个是作用域

$()有2个参数,一个是选择器,一个是作用域。
要和$("xxxx,xxx")区分。通常意义下的$('xxxx')其实是默认了第二个作用域。完整说应该是$('xxxx',document)
$("#select1").dblclick(function(){
var $option=$("option:selected",this);//在select1中选择selected的option
$option.appentTo($("#select2"));
})

posted on 2016-06-15 18:06  kingplus  阅读(1406)  评论(0编辑  收藏  举报

导航