When you do: functionName();. you are basically calling the function. The correct way will be: htmlElement.onclick = functionName; // No braces function ...
確定! 回上一頁