點擊按鈕沒有跳出對話框
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>函數調用</title>
? ?<script type="text/javascript">
? ? ? ?contxt() //定義函數
? ? ? {
? ? ? ? ?alert("哈哈,調用函數了!");
? ? ? }
? ?</script>
</head>
<body>
? ?<form>
? ? ? <input type="button" ?value="點擊我" onclick="contxt()" /> ?
? ?</form>
</body>
</html>
2016-07-11
要細心點,注意定義函數時候,要在前面加上function
2016-07-07
定義函數的時候 沒有加function