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