我现在对此失去了理智!
我试图在chrome插件中创建一个简单的数据库连接,我将用它进行分配。
以下HTML和PHP脚本在我的网络浏览器中都可以正常工作,但是“提交”#39;当我尝试在我的chrome插件中运行相同的代码时,按钮不会触发php脚本。任何帮助是极大的赞赏。文件如下:
的manifest.json
"name": "Demo - DatabaseConnection",
"description": "Demo - Connecting to a database",
"manifest_version": 2,
"browser_action": {
"default_title": "DemoDBConnection",
"default_popup": "popup.html"
},
"version": "1.0",
"permissions": [
"http://localhost/*"
]
popup.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<form action = "http://localhost/db1/script.php" method = "post">
<input type = "text" name = "name" placeholder = "Your Name" />
<input type = "text" name = "email" placeholder = "Your Email" />
<input type = "submit" value = "Go" />
</form>
</body>
的script.php
<pre><?php
echo 'Hello';
?>
</pre>