私はjsに非常に慣れていないので、助けていただければ幸いです。同じように動作すると思われるコード ブロックが 2 つありますが、動作しません。誰かがどのように違うのか説明できますか? コードの最初の部分では、パーサーが関数に直接入っているようです。
function embedGameSwfAfterReg() {
embedGameSwf("{$swfLocation}", "100%", "100%", {$flashVars});
}
API.registerOnload(embedGameSwfAfterReg())
と
API.registerOnload(function() {
embedGameSwfAfterReg("{$swfLocation}", "100%", "100%", {$flashVars});
});