运行代码,没有出现“点击我”按钮,直接弹出窗口吗?
<script type="text/javascript">
function contxt() //定义函数
{
alert("哈哈,调用函数了!");
}
contxt();
</script>
</head>
<body>
<form>
<input type="button" value="点击我" onclick="contxt()" />
</form>
</body>
<script type="text/javascript">
function contxt() //定义函数
{
alert("哈哈,调用函数了!");
}
contxt();
</script>
</head>
<body>
<form>
<input type="button" value="点击我" onclick="contxt()" />
</form>
</body>
2020-02-21
举报