hdjs
Version:
hdjs framework
64 lines (60 loc) • 1.92 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script>
window.hdjs = {};
window.hdjs.base = '../';
window.hdjs.uploader = 'php/uploader.php?';
window.hdjs.filesLists = 'php/filesLists.php?';
</script>
<script src="../dist/static/requirejs/require.js"></script>
<script src="../dist/static/requirejs/config.js"></script>
</head>
<body style="padding: 50px;">
<a onclick="base()" class="btn btn-default">基本使用</a>
<script>
require(['hdjs'])
function base() {
require(['hdjs'], function (hdjs) {
hdjs.message('基本使用', '', 'success');
})
}
</script>
<a onclick="size()" class="btn btn-default">弹出框宽度100%</a>
<script>
function size() {
require(['hdjs'], function (hdjs) {
hdjs.message('弹出框宽度100%', '', 'success', 2, {width: '80%'});
})
}
</script>
<a onclick="hideModal()" class="btn btn-default">使用modal模态框事件处理</a>
<script>
function hideModal() {
require(['hdjs'], function (hdjs) {
hdjs.message('使用modal模态框事件处理', '', 'success', 2, {
events: {
'hidden.bs.modal': function () {
alert('模态框消失时,我来了');
}
}
});
})
}
</script>
<a onclick="confirm()" class="btn btn-default">确认消息</a>
<script>
function confirm() {
require(['hdjs'], function (hdjs) {
hdjs.confirm('确定删除吗?', function () {
alert('点击确定后执行的回调函数');
})
})
}
</script>
</body>
</html>