zoukankan      html  css  js  c++  java
  • Extjs杂项

    /*//简单的弹出提示窗口
        function()
        {
         Ext.MessageBox.alert('Hello','Welcome to my home!');
        }*/
        
        /*//弹出窗口
        function()
        {
         var win=new Ext.Window({title:'hello',300,height:200,html:"<input value='hello'/>"});
         win.show();
        }*/
        
        /*//元素打开后颜色渐变
        function()
        {
         Ext.get('bodyid').highlight();
        }*/
        
        /*//选中元素
        function() {
         Ext.select('p').highlight();
        }*/
        
        /*//给控件添加事件
        function()
        {
         Ext.select('p').on('click',function(e){Ext.get(e.target).highlight();});
        }*/
        /*//panel面板
        function()
        {
         var my_panel = new Ext.Panel({     
         title: 'Panel',
         500,
         height:300,
         buttons:[{text:'Button'}],
         html:'<h2>This is a panel.</h2>',
         tbar:[{text:'Top toolbar'}],
         bbar:[{text:'Bottom toolbar'}]
         });
         my_panel.render(paneldiv);
        }*/
        /*//tabpanel
        function()
        {
         var tabpanel=new Ext.TabPanel(
          {
           300,height:200,
           items:[
            {title:"面板1",height:30,html:'sdfsdfsdf'},
            {title:"面板2",height:30,html:'dsfsdfsdfsdfsdfsdfsdf'}
           ]
          }
          );
         tabpanel.render('paneldiv');     
        }*/
        /*//面板添加tools:save,help,close    
        function()
        {
         new Ext.Panel(
          {
           renderTo:'paneldiv',
           title:'hello',
           300,
           height:200,
           html:'<h1>hello,open source</h1>',
           tools:[
             {id:"save"},
             {id:"help",handler:function(){Ext.MessageBox.alert('help','请帮助我..............!');}},
             {id:"close",handler:function(){Ext.Msg.alert('提示','关闭');Ext.get('paneldiv').innerHtml='';}}
            ],
           tbar:[{pressed:true,text:'刷新'}]
          }
         )
        }*/
        /*//面板工具条中加入按钮、文本、空白、填充条、分隔符
        function()
        {
         var panel=new Ext.Panel({title:"hello",300,height:200,html:'<h1>aaaaaaaaa</h1>',
               tbar:[//new Ext.Toolbar.TextItem('工具条'),
                 {Button:'',text:'Button'},
                 {TextItem:'',text:'工具条'},             
                 {pressed:true,text:'添加'},
                 {xtype:"tbseparator"},             
                 {pressed:false,text:"保存"},             
                 {Spacer:'dd',text:"Spacer"},
                 {Separator:'',text:'Separator'}
                 ]
               });
         panel.render('paneldiv');
        }*/

    /*//提示窗口
        function()
        {
         Ext.get("btn").on("click",function(){
          //Ext.MessageBox.confirm("请确认","是否真的要删除指定内容",function(button,text)//返回值是yes或no
          //Ext.MessageBox.prompt("请确认","是否真的要删除指定内容",function(button,text)//返回值是ok或cancel
          Ext.MessageBox.show({title:"请确认",msg:"是否真的要删除指定内容",buttons:Ext.Msg.YESNOCANCEL,fn:function(button,text)//返回值是yes、no或cancel
                        {
                         alert(button);
                         if(button=="yes")
                         {
                          //删除操作
                          alert('删除成功!'+text);
                         }                     
                        }
               })
          });
        }*/

  • 相关阅读:
    你不知道的多重循环的事情
    【浅墨Unity3D Shader编程】之三 光之城堡篇:子着色器、通道与标签的写法 &amp; 纹理混合
    ssh 远程登陆指定port
    GMT和CST的转换
    Swift新手教程系列5-函数+selector在swift中的使用方法
    Mac OS X 10.10, Eclipse+ADT真机调试代码时,Device Chooser中不显示真机的解决方式
    android studio 0.8.1使用和遇到问题解决
    C语言之函数调用17—递归法之中的一个般函数的调用(2)
    C语言之基本算法25—牛顿迭代法求方程近似根
    FineUI之使用SQL脚本从数据库表中生成对应的输入控件
  • 原文地址:https://www.cnblogs.com/kuailewangzi1212/p/1246884.html
Copyright © 2011-2022 走看看