zoukankan      html  css  js  c++  java
  • (二)jquery easyUI提示框的使用

    1:弹出提示窗的使用

    (1)屏幕右下弹出提示窗口:

       $.messager.show({
        title:'My Title',
        msg:'Message will be closed after 4 seconds.',
        timeout:4000,(可选)
        height:150, (可选)
        350,(可选)
        showType:'show'
       });

      timeout:number,(定期关闭)
        showType:String(弹出的窗口的方式:show,slide,fade)
       });

    (2)进度条:

       var win = $.messager.progress({
        title:'Please waiting',
        msg:'Loading data...'
       });
       setTimeout(function(){
        $.messager.progress('close');
       },mix);

     mix:可以为数字(毫秒)或者为返回数字的函数;获取或者设置进度条的方法为:

     var value = $('#p').progressbar('getValue');  

     if (value < 100){  

         value += Math.floor(Math.random() * 10);  

         $('#p').progressbar('setValue', value);  

     }

     

    (3)普通弹出框:

    $.messager.alert(title,msg,type);

    type:可以省略,取值为:error,info,question,warning.

    (4)确认弹出框:

       $.messager.confirm('My Title', 'Are you confirm this?', function(r){
        if (r){
         alert('confirmed:'+r);
         location.href = 'http://www.google.com';
        }
       });

    (5)输入弹出框:

       $.messager.prompt('My Title', 'Please type something', function(r){
        if (r){
         alert('you type:'+r);
        }
       });

     

      

  • 相关阅读:
    【笔记】【dp模型】
    【刷题】【dp】【背包】金明的预算
    建模结束了——5.3
    HDU
    洛谷 P2734 [USACO3.3]游戏 A Game
    洛谷 P4095 [HEOI2013]Eden 的新背包问题
    洛谷 P1156 垃圾陷阱
    洛谷 P1833 樱花
    洛谷 P3966 [TJOI2013]单词
    洛谷 P5357 【模板】AC自动机(二次加强版)
  • 原文地址:https://www.cnblogs.com/wangdonghua/p/3321130.html
Copyright © 2011-2022 走看看