没有内联脚本,但是它仍然返回错误。
new.html
<!DOCTYPE html>
<html>
<head>
<title>Something</title>
</head>
<body>
<button onclick="increment()">Click Me!</button>
<p id = "lal">2</p>
<script src = "popup.js"></script>
</body>
</html>
popup.js
var num = 1;
function increment(){
document.getElementById("lal").innerHTML = num * 2;
num = num * 2;
}