1 Star 0 Fork 0

方志朋/JavaScriptConnAndroid

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.html 905 Bytes
一键复制 编辑 原始数据 按行查看 历史
方志朋 提交于 2016-06-22 08:49 +08:00 . first commit
<!DOCTYPE html>
<html>
<head>
<meta chatset="utf-8" />
<title>This is a test</title>
<style>
*{
margin: 0;
padding: 0;
}
a{
display: block;
width: 100px;
padding: 1em;
margin: 0 auto;
font-size: 1em;
color: #FFF;
background-color: highlight;
text-decoration: none;
}
</style>
</head>
<body>
<a>js中调用本地方法</a>
<script>
function funFromjs(){
document.getElementById("helloweb").innerHTML="HelloWebView,i'm from js";
}
var aTag = document.getElementsByTagName('a')[0];
aTag.addEventListener('click', function(){
//调用android本地方法
myObj.fun1FromAndroid("调用android本地方法fun1FromAndroid(String name)!!");
return false;
}, false);
</script>
<p></p>
<div id="helloweb">
</div>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/forezp/JavaScriptConnAndroid.git
git@gitee.com:forezp/JavaScriptConnAndroid.git
forezp
JavaScriptConnAndroid
JavaScriptConnAndroid
master

搜索帮助