หากต้องการเรียกใช้ฟังก์ชัน JavaScript หลายฟังก์ชันในเหตุการณ์คลิก ให้ใช้เครื่องหมายอัฒภาคดังที่แสดงด้านล่าง -
onclick="Display1();Display2()"
ตัวอย่าง
การสาธิตสด
<html>
<head>
<script>
function Display1() {
document.write ("Hello there!");
}
function Display2() {
document.write ("Hello World!");
}
</script>
</head>
<body>
<p>Click the following button to call the function</p>
<form>
<input type = "button" onclick = "Display1(); Display2()" value = "Result">
</form>
</body>
</html>