私はjQueryを使い始めていますが、関数内にかっこを入れるかどうかの違いは何ですか?jQueryの関数の中にかっこ付きかどうかで関数を書くこととの違いは何ですか?
function test(){
alert("pen pineapple apple pen");
}
この:
$(document).ready(test);
と、この:私は次の関数がある場合たとえば は、 "ペンパイナップルリンゴペン"
:$(document).ready(test());
の両方を同じ結果を示しました
も参照してください[この質問](http://stackoverflow.com/questions/3246928/in-javascript-does-it-make-a-difference-if-i-call-a-function-with-eparentheses) 。 – nnnnnn