運行代碼,沒有出現“點擊我”按鈕,直接彈出窗口嗎?
<script type="text/javascript">
? ? ? function contxt() //定義函數
? ? ? {
? ? ? ? ?alert("哈哈,調用函數了!");
? ? ? }
? ? ? contxt();
? ?</script>
</head>
<body>
? ?<form>
? ? ? <input type="button"? value="點擊我" onclick="contxt()" />??
? ?</form>
</body>
2020-02-21
已解決