清華大佬耗費三個月吐血整理的幾百G的資源,免費分享!....>>>
JavaScript 函數
函數是由事件驅動的或者當它被調用時執行的可重復使用的代碼塊。
實例
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction()
{
alert("Hello World!");
}
</script>
</head>
<body>
<button onclick="myFunction()">Try it</button>
</body>
</html>
<html>
<head>
<script>
function myFunction()
{
alert("Hello World!");
}
</script>
</head>
<body>
<button onclick="myFunction()">Try it</button>
</body>
</html>
掃碼二維碼 獲取免費視頻學習資料