我有一个带有图像的android studio项目。该项目使用Webviews显示一个用PHP和Javascript构建的网站。我在通过xampp连接的本地计算机上有一个测试环境。它允许我测试JS函数。我正在测试的一个按钮是一个按钮,它可以正常工作,但是我似乎无法连接到图像,因此该按钮是android studio项目中images文件夹中的图标。我已经包括了PHP / JS。希望有人能帮忙。谢谢。
<!DOCTYPE html>
<html>
<head>
<title>Mine</title>
<script type="text/javascript">
var testButtonFunction = function myFunction () {
alert("The button seems to work!");
}
AptMobileInterface.addActionBarButton
(JSON.stringify
({"reference": "abc",
"icon": "LINK TO IMAGE HERE????",
"permanent": true
}));
</script>
</head>
<body>
<button onclick="testButtonFunction()"> <img src="icon" alt="Image input control" width="10%" height="10%"></button>
</body>
</html>