我目前正在构建chrome应用程序没有扩展程序,登录后我无法进入“主屏幕”。我尝试仅在浏览器中打开html文件,但它可以工作,但是当我在应用程序中使用它时,它无法打开第二个屏幕。我已经附加了代码的所有元素,因为我不确定哪些元素将有助于解决此问题。
代码低于-只有一个我没有附加的代码是第二个屏幕,因为这无关紧要。
登录屏幕(HTML):
python3 --version
清单(JSON):
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<form action="screen2.html">
<div class="imgcontainer">
<img src="images.jpeg" alt="Avatar" class="avatar">
</div>
<div class="container">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="username" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="password" required>
<button href="screen2.html" type="submit">Login</button>
<label>
</label>
</div>
</form>
</body>
</html>
背景脚本(JavaScript):
{
"name": "App that I am building",
"description": "none",
"version": "16.3",
"minimum_chrome_version": "46",
"manifest_version": 2,
"app": {
"background": {
"scripts": ["background.js"]
}
},
"icons": { "16": "icon16.png", "128": "icon128.png" }
}