I am the front-end js,. I need to pass 4 parameters to Android and ios through OC, they do the sharing function, and then return to me whether the sharing is successful.
how should it be implemented? there had better be no compatibility problems, now both Android and ios versions are so new. The method I"m using now doesn"t seem to be safe enough.
<html>
<header>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script type="text/javascript">
function showAlert(message) {
alert(message);
}
function loadURL(url) {
var iFrame;
iFrame = document.createElement("iframe");
iFrame.setAttribute("src", url);
iFrame.setAttribute("style", "display:none;");
iFrame.setAttribute("height", "0px");
iFrame.setAttribute("width", "0px");
iFrame.setAttribute("frameborder", "0");
document.body.appendChild(iFrame);
iFrame.parentNode.removeChild(iFrame);
iFrame = null;
}
function firstClick() {
loadURL("firstClick://shareClick?title=&content=&url=&imageUrl=");
}
</script>
</header>
<body>
<button type="button" onclick="firstClick()">Click Me!</button>
</body>
</html>