자바스크립트 함수를 함수로 호출하려면 일반 사용자 정의 자바스크립트 함수처럼 호출하세요.
예시
다음 코드를 실행하여 JavaScript 함수를 함수로 호출할 수 있습니다. −
<html>
<head>
<script>
function Display()
{
document.write ("Hello World!");
}
</script>
</head>
<body>
<p>Click the following button to call the function</p>
<form>
<input type = "button" onclick = "Display()" value = "Display">
</form>
</body>
</html>