kendo.mobile 的modalview微件


相关属性

1    data-role="modalview"

2   data-open="aaaaaa" 打开时候调用的函数

3   data-close="aaaaa" 关闭的时候执行的参数

4   data-modal="false"  点击空白处关闭

5  data-style="inset" 显示风格,通用

6  data-width="300px" 宽度

7  data-height="300px"高度

jq的关闭方式

1  $("#myvidew").data("kendoMobileModalView").close();  关闭

2  $("#myvidew").data("kendoMobileModalView").open();  打开

-----------------------------------------------------------------案例-------------------------------------

<div data-role="modalview" style="text-align:center" data-style="inset" data-open="modalViewOpen" data-close="closemodalviewing" data-height="120px" data-width="300px" id="myvidew" data-modal="false">
    <div style="  margin:6px;"><a style="float:right; " data-click="closemodalview" data-role="button" data-icon="history"></a> <span style="float: right; font-size: 22px; margin-right: 60px; ">信息提示</span> </div>
    <div style="clear:both;"></div>
    <div style="width: 100%; height: 1px; border: solid 1px #4c5356; margin-bottom:20px; "></div>
    <a data-role="button" data-style="inset" data-click="nextpage">答下一题</a>  <a data-role="button" data-style="inset" data-click="closean">显示成绩</a>
</div>


<script>
    var Application = new kendo.mobile.Application(document.body, {
        skin: 'flat-skin',
        init: initialize()
    });
    function initialize() {
        var buttomgroup = $("#listButtons2").kendoMobileButtonGroup({
            index: 0,
            enable: false,
            selectOn: "up"
        });

    }
    function getdashlets(e)
    {
        var data = e.button.data();
        if (data.id == 'rights')
        {
            $("#myvidew").data("kendoMobileModalView").open();
            alert(data.c1);
        }
        else if (data.id == 'wrongs')
        {
            alert(data.c1);
        }
    }
    function closemodalview()
    {
        $("#myvidew").data("kendoMobileModalView").close();
    }
    function closemodalviewing()
    {
        alert("关闭中");
    }
    function nextpage()
    {
        window.location.href = "/home/index";
    }
    function closean()
    {
        window.location.href = "/home/set3";
    }
</script>





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值