-
Notifications
You must be signed in to change notification settings - Fork 366
/
index.html
39 lines (35 loc) · 1.33 KB
/
index.html
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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="css/mui.min.css" rel="stylesheet" />
</head>
<body>
<div class="mui-content mui-content-padded">
<button id="btn" type="button" class="mui-btn mui-btn-blue mui-btn-block">按钮</button>
</div>
<script src="js/mui.min.js"></script>
<script src="js/mui.jsonp.js"></script>
<script type="text/javascript">
mui.init()
/**
* http://fanyi.youdao.com/openapi.do?keyfrom=xqnblog&key=1828999753&type=data&doctype=json&version=1.1&q=good
*/
var url = 'http://fanyi.youdao.com/openapi.do?callback=?'
document.querySelector('#btn').addEventListener('tap',function () {
mui.getJSON(url,{
keyfrom: "xqnblog",
key: "1828999753",
type: "data",
doctype: "jsonp",
version: "1.1",
q: 'good'
},function(rs){
mui.toast("res:"+JSON.stringify(rs));
});
})
</script>
</body>
</html>