energy/example/browser-execute-javascript/resources/execute-javascript.html
2022-11-23 18:36:17 +08:00

24 lines
679 B
Go

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>execute-javascript</title>
<script type="application/javascript">
function GoExecuteJSFunc(param, param1) {
let message = document.getElementById("message");
message.innerHTML = message.innerHTML + "param0: " + param + " param1: " + param1 + "<br>"
if (param % 2 === 0) {
message.style.color = "red"
} else {
message.style.color = "blue"
}
}
</script>
</head>
<body style="overflow: hidden;margin: 0px;padding: 0px;">
execute-javascript:<br>
<div id="message">
</div>
</body>
</html>