注
发布时间
阅读量:
阅读量
(一)ts 向 html 传递参数以及 ts 调用 html 中的方法
index.html
<script type="text/javascript">
function Read(url){
console.log("这是html里",url)
}
</script>
GameMain.ts
constructor() {
window["Read"]("传值");
}

(二)ts 传方法给html
index.html
function Read(url,cb){
console.log("这是html里==》",url)
cb("html给的值")
}
GameMain.ts
private str_text = null;
全部评论 (0)
还没有任何评论哟~
