jQuery.fn.functiona = function() {
//return this.each(function() { **** }
jQuery(this).css('backgroundColor','red');
}css
jQuery(document).ready(function() {
jQuery('#user-login-form').functiona();
});this
jQuery.fn.functiona = function() {
//return this.each(function() { **** }
return jQuery(this).css('backgroundColor','red');
}orm
jQuery(document).ready(function() {
jQuery('#user-login-form').functiona();
});io
--- 奇怪的是,有没有return均可以,请问这是为何?
--碰到问题怎么办?第一,是去问,问不到,很差问,不要忘了一件事,就是去试验,这样本身得出结论更加可靠更加印象深入。丰衣足食本身动手。function