创建
首先,新建一个txt文件更改后缀名为js
点击另存为
创建成功
调用
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript</title>
</head>
<body>
<p id="registerN">登录失败</p>
<button type="button" onclick="myFunction()">重试</button>
<script src="dblScript.js"></script>
</body>
</html>
调用dblScript.js文件,点击按钮执行文件中的myFunction()函数
点击“重试”按钮后
完成调用