forked from shaojiankui/JavaScriptCore-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJSCallOC.html
More file actions
97 lines (70 loc) · 2.52 KB
/
JSCallOC.html
File metadata and controls
97 lines (70 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi"/>
<title>JSCallOC</title>
<style>
*
{
//-webkit-tap-highlight-color: rgba(0,0,0,0);
text-decoration: none;
}
html,body
{
-webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
-webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
}
#div-a
{
background:#FBA;
color:#FFF;
border-radius: 25px 5px;
}
</style>
<script type="text/javascript">
function showResult(resultNumber)
{
//alert(resultNumber);
document.getElementById("result").innerText = resultNumber;
}
</script>
</head>
<body style="background:#CDE; color:#FFF">
<div>
<font size="3" color="black">输入一个整数:</font>
<textarea id="input" style="font-size:10pt;color:black;"></textarea>
</div>
<br/>
<div>
<font size="3" color="black">结果: <b id="result"> </b> </font>
</div>
<br/>
<div id="div-a">
<center>
<br/>
<input type="button" value="计算阶乘" onclick="native.calculateForJS(input.value);" />
<br/>
<br/>
<input type="button" value="测试log" onclick="log('测试');" />
<br/>
<br/>
<input type="button" value="oc原生Alert" onclick="alert('alert');" />
<br/>
<br/>
<input type="button" value="addSubView" onclick="addSubView('view');" />
<br/>
<br/>
<input type="button" value="多参数调用" onclick="mutiParams('参数1','参数2','参数3');" />
<br/>
<br/>
<a id="push" href="#" onclick="native.pushViewControllerTitle('SecondViewController','secondPushedFromJS');">
push to second ViewController
</a>
<br/>
<br/>
</center>
</div>
</body>
</html>