提交 38f898a0 编写于 作者: L lixiang 提交者: 李想

fixed 719b106c from https://gitee.com/li-xiang335/docs/pulls/21160

modify registerJavaScriptProxy of sample code
Signed-off-by: Nlixiang <lixiang380@huawei.com>
上级 ea61f4c5
...@@ -1042,12 +1042,14 @@ struct Index { ...@@ -1042,12 +1042,14 @@ struct Index {
<html> <html>
<meta charset="utf-8"> <meta charset="utf-8">
<body> <body>
Hello world! <button type="button" onclick="htmlTest()">Click Me!</button>
<p id="demo"></p>
</body> </body>
<script type="text/javascript"> <script type="text/javascript">
function htmlTest() { function htmlTest() {
str = objName.test("test function") let str=objName.test();
console.log('objName.test result:'+ str) document.getElementById("demo").innerHTML=str;
console.log('objName.test result:'+ str)
} }
</script> </script>
</html> </html>
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<p id="demo"></p> <p id="demo"></p>
<script> <script>
function callArkTS() { function callArkTS() {
let str = testObjName.test(); let str = objName.test();
document.getElementById("demo").innerHTML = str; document.getElementById("demo").innerHTML = str;
console.info('ArkTS Hello World! :' + str); console.info('ArkTS Hello World! :' + str);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册