|
constactOperate模块(界面布局)demo示例
[复制链接]
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
<meta name="format-detection"
content="telephone=no, email=no, date=no, address=no">
<title>demo</title>
<link rel="stylesheet" type="text/css" href="../css/api.css" />
<script type="text/javascript" src="../script/api.js"></script>
<style>
html, body {
height: 100%
}
body {
background-color: #fff;
margin: 0;
}
#wrap {
height: 100%;
position: relative;
}
#header {
padding-top: 20px;
background-color: #5082c2;
height: 44px;
position: relative;
}
#header h1 {
font-size: 20px;
height: 44px;
line-height: 44px;
margin: 0em;
color: #fff;
margin-left: 100px;
margin-right: 100px;
text-align: center;
}
#main {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
}
a.button {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
-webkit-box-align: center;
height: 32px;
margin: 8px;
background-color: rgba(240, 240, 240, 1.0);
border-color: rgba(220, 220, 220, 1.0);
border-width: 2px;
border-style: solid;
}
a.active {
background-color: rgba(240, 240, 240, 0.7);
}
</style>
<script type="text/javascript">
var demo;
apiready = function() {
demo = api.require('constactOperate');
}
function fnInput1() {
var param = {
x : 0,
y : 340,
w : 0,
h : 100,
type : 1,
notice : '您未打开联系人权限或没有联系人'
};
demo.input(param, function(ret, err) {
alert(JSON.stringify(ret));
});
}
function fnInput2() {
var param = {
x : 0,
y : 330,
w : 0,
h : 100,
type : 2,
notice : '您未打开联系人权限或没有联系人'
};
demo.input(param, function(ret, err) {
alert(JSON.stringify(ret));
});
}
function fnHide() {
demo.hide();
}
function fnShow() {
demo.show();
}
function fnDestroy() {
demo.destroy();
}
</script>
</head>
<body>
<a class="button" tapmode="active">单选联系人</a>
<a class="button" tapmode="active">多选联系人</a>
<a class="button" tapmode="active">隐藏</a>
<a class="button" tapmode="active">显示</a>
<a class="button" tapmode="active">释放内存</a>
</body>
</html>
界面布局模块,constactOperate模块demo
|
本帖子中包含更多资源,您需要 登录 才可以下载或查看,没有帐号?立即注册
X
|