精华内容
下载资源
问答
  • bootstrap-dialog3 官方文档例子 引入css,js 注意:一定先引入jq以及bootstrap,这是被依赖项 <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script> <link href=...

    bootstrap-dialog3

    官方文档例子

    引入css,js  注意:一定先引入jq以及bootstrap,这是被依赖项

    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <link href="https://cdn.bootcss.com/bootstrap3-dialog/1.35.0/css/bootstrap-dialog.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/bootstrap3-dialog/1.35.0/js/bootstrap-dialog.min.js"></script>

    代码

    <body>
        <button id="tm" class="btn btn-primary">点我</button>
    </body>
    
    <script>
        $(function () {
            $('#tm').on('click', function () {
                BootstrapDialog.show({
                    type: BootstrapDialog.TYPE_DANGER,
                    message: '你确定要删除吗?',
                    size: BootstrapDialog.SIZE_NORMAL,
                    buttons: [{
                        label: '确定',
                        action: function (dialog) {
                            dialog.close();
                        }
                    }, {
                        label: '取消',
                        action: function (dialog) {
                            dialog.close();
                        }
                    }]
                });
            })
        })  
    </script>

    注意:bootstrap用4版本会报错 Uncaught TypeError: t.querySelector is not a function,改成3版本就好了

    默认属性

    BootstrapDialog.defaultOptions = {
            type: BootstrapDialog.TYPE_PRIMARY,
            size: BootstrapDialog.SIZE_NORMAL,
            cssClass: '',
            title: null,
            message: null,
            nl2br: true,
            closable: true,
            closeByBackdrop: true,
            closeByKeyboard: true,
            closeIcon: '&#215;',
            spinicon: BootstrapDialog.ICON_SPINNER,
            autodestroy: true,
            draggable: false,
            animate: true,
            description: '',
            tabindex: -1,
            btnsOrder: BootstrapDialog.BUTTONS_ORDER_CANCEL_OK
        };

    jquery.qqface

    https://github.com/kyo4311/jquery.qqface

    引入jquery.qqface.js 比较难找cdn资源,可以本地引入

    代码

    <div>
         <textarea id="liveChatContent" spellcheck="false"></textarea>
    </div>
    <a href="javascript:;" id="face">表情</a>
    
    $.qqface({
         imgPath: 'gif/',  /图片文件夹
         textarea: $('#liveChatContent'),
         handle: $('#face')
     });

    效果

    文件目录

    fancybox插件

    引入css,js

    <link href="https://cdn.bootcss.com/fancybox/3.5.7/jquery.fancybox.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/fancybox/3.5.7/jquery.fancybox.min.js"></script>

    代码

    <a rel="group" href="./1.png" title="2019/09/19">
       <img src="./1.png" alt="/1.png" width="90" />
     </a>
    $("a[rel=group]").fancybox();

    效果 

    展开全文
  • Dialog问题

    2017-01-19 02:02:08
    传递给Class1,在Dialog2上面进行一些数据设置,然后点击Dialog2中一个按钮事件,显示Dialog3(不显示Dialog2),同时将Dialog2中设置的数据传递给Dialog3,然后在Dialog3中调用Class1中的一些函数(这些函数是
    Class1是自己建立的一个类
    Dialog1是主对话框,点击上面一个按钮事件显示Dialog2同时将主对话框(Dialog1)中一些数据
    传递给Class1,在Dialog2上面进行一些数据设置,然后点击Dialog2中一个按钮事件,显示Dialog3(不显示Dialog2),同时将Dialog2中设置的数据传递给Dialog3,然后在Dialog3中调用Class1中的一些函数(这些函数是根据Dialog1中的数据来执行的)进行最终操作。
    请各位大侠赐教!!!!
    分不够再加!!!!
    展开全文
  • dialog3"></commandbutton> <dialog id="dialog2" header="Modal Dialog" widgetvar="dlg2" modal="true" minimizable="true" ...
  • 3. 写了一些 dialog 的推荐用法 <p><strong>3. Pull Request针对问题的重现方式(没有请在下一行填“无”)</strong></p> <p><strong>4. Pull Request可能涉及到的组件范围(没有请在下一行填“无...
  • Dialog实现3D翻转效果

    2017-08-17 13:49:22
    Dialog实现3D翻转效果,资源里包含两种旋转效果
  • Dialog

    2019-06-16 14:43:44
    Dialog对话框 一:常用对话框 1.普通对话框 2.单选对话框 3.多选对话框 4.自定义对话框 5.水平进度条对话框 6.圆形进度条对话框 7.日期选择对话框 8.时间选择对话框 对话框 类 特殊 普通 AlertDialog....

    Dialog对话框

    一:常用对话框
    1.普通对话框
    2.单选对话框
    3.多选对话框
    4.自定义对话框
    5.水平进度条对话框
    6.圆形进度条对话框
    7.日期选择对话框
    8.时间选择对话框

    对话框 特殊
    普通 AlertDialog.Builder()
    单选 AlertDialog.Builder() setSingleChoiceItems()
    多选 AlertDialog.Builder() setMultiChoiceItems()
    日期 DatePickerDialog new DatePickerDialog(context,DatePickerDialog.OnDateSetListener,year,month,day);
    时间 TimePickerDialog new TimePickerDialog(context, TimePickerDialog.OnTimeSetListener,时,分,是否24进制);
    水平 ProgressDialog setStyle(ProgressDialog.STYLE_HORIZONTAL)
    圆圈 ProgressDialog setStyle(ProgressDialog.STYLE_SPINNER)
    自定义 AlertDialog.Builder() setView()

    自定义对话框
    1.自定义类继承Dialog
    2.重写Dialog的方法并添加需要实现的功能
    3.在Activity中实例化自定义类的对象

    展开全文
  • 3.Dialog 返回值到Activity的方法是定义一个接口,接口中定义返回值到Activity的方法,MyDialog实现这个接口,然后在需要的位置调用接口中的方法,Activity实现这个接口, 重写接口的方法 代码如下 return_code_...

    步骤:

    1.定义自定义的Dialog的布局文件

    2.写一个类MyDialog继承Dialog

    3.Dialog 返回值到Activity的方法是定义一个接口,接口中定义返回值到Activity的方法,MyDialog实现这个接口,然后在需要的位置调用接口中的方法,Activity实现这个接口,

    重写接口的方法

    代码如下

    return_code_dialog.xml

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="10dp"
        android:background="@color/white"
        android:weightSum="1">
    
        <TextView
            android:id="@+id/title"
            android:layout_width="321dp"
            android:layout_height="wrap_content"
            android:textColor="@color/black"
            android:textSize="24dp"/>
        <View
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:background="@color/black"
            />
        <TextView
            android:id="@+id/content"
            android:layout_marginTop="10dp"
            android:layout_width="305dp"
            android:layout_gravity="center"
            android:textColor="@color/viewfinder_mask"
            android:layout_height="wrap_content"
            android:textSize="18dp"/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_marginTop="10dp"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
       <EditText
           android:layout_width="0dp"
           android:layout_weight="1"
           android:gravity="center"
           android:textSize="20dp"
           android:password="true"
           android:layout_height="50dp"
           android:background="@drawable/bg_edit_normal"
           android:id="@+id/psw_1"
           android:digits="1234567890"/>
        <EditText
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="50dp"
            android:background="@drawable/bg_edit_normal"
            android:id="@+id/psw_2"
            android:password="true"
            android:gravity="center"
            android:textSize="20dp"
            android:digits="1234567890"
            />
        <EditText
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="50dp"
            android:background="@drawable/bg_edit_normal"
            android:id="@+id/psw_3"
            android:password="true"
            android:gravity="center"
            android:textSize="20dp"
            android:digits="1234567890"
            />
        <EditText
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="50dp"
            android:background="@drawable/bg_edit_normal"
            android:id="@+id/psw_4"
            android:password="true"
            android:gravity="center"
            android:textSize="20dp"
            android:digits="1234567890"
            />
        <EditText
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="50dp"
            android:background="@drawable/bg_edit_normal"
            android:id="@+id/psw_5"
            android:password="true"
            android:gravity="center"
            android:textSize="20dp"
            android:digits="1234567890"
            />
        <EditText
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="50dp"
            android:background="@drawable/bg_edit_normal"
            android:id="@+id/psw_6"
            android:password="true"
            android:gravity="center"
            android:textSize="20dp"
            android:digits="1234567890"
            />
        </LinearLayout>
    </LinearLayout>
    interface MyJudgePasswordInterface
    public interface MyJudgePasswordInterface {
        public void returnJudgePasswordResult(boolean result);
    }
    
    

    PasswordDialog.java

    package com.example.administrator.bigelephantbike;
    
    import android.app.AlertDialog;
    import android.app.Dialog;
    import android.content.Context;
    import android.content.Intent;
    import android.os.Bundle;
    import android.text.Editable;
    import android.text.TextWatcher;
    import android.util.Log;
    import android.view.KeyEvent;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.inputmethod.EditorInfo;
    import android.widget.EditText;
    import android.widget.TextView;
    
    import org.w3c.dom.Text;
    
    /**
     * Created by Administrator on 2016/4/3.
     */
    public class PasswordDialog extends Dialog implements TextWatcher,View.OnKeyListener{
    
        private Context context;
        private String title;
        private String content;
        private TextView titleTextView;
        private TextView contentTextVIew;
        private EditText eidtText1;
        private EditText eidtText2;
        private EditText eidtText3;
        private EditText eidtText4;
        private EditText eidtText5;
        private EditText eidtText6;
        private String password;
        private int current=0;
        private String[]passwordInput =new String[6];
        private int maxLen =1;//限制EditText的输入长度
        private MyJudgePasswordInterface myJudgePasswordInterface;
    
        public PasswordDialog(Context context) {
            super(context);
        }
        public PasswordDialog(Context context, int themeResId) {
            super(context, themeResId);
        }
        public PasswordDialog(Context context,String title,String content,String password,MyJudgePasswordInterface myJudgePasswordInterface){
            super(context,R.style.add_dialog);
            this.context =context;
            this.title=title;
            this.content =content;
            this.password =password;
            this.myJudgePasswordInterface =myJudgePasswordInterface;
        }
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            init();
        }
        void init(){
            LayoutInflater inflater = LayoutInflater.from(context);
            View view = inflater.inflate(R.layout.return_code_dialog, null);
            setContentView(view);
    
            titleTextView =(TextView)findViewById(R.id.title);
            contentTextVIew=(TextView)findViewById(R.id.content);
            eidtText1 =(EditText)findViewById(R.id.psw_1);
            eidtText2 =(EditText)findViewById(R.id.psw_2);
            eidtText3 =(EditText)findViewById(R.id.psw_3);
            eidtText4 =(EditText)findViewById(R.id.psw_4);
            eidtText5 =(EditText)findViewById(R.id.psw_5);
            eidtText6 =(EditText)findViewById(R.id.psw_6);
    
            titleTextView.setText(title);
            contentTextVIew.setText(content);
    
            //锁定数字键盘
            eidtText1.setInputType(EditorInfo.TYPE_CLASS_NUMBER);
            eidtText2.setInputType(EditorInfo.TYPE_CLASS_NUMBER);
            eidtText3.setInputType(EditorInfo.TYPE_CLASS_NUMBER);
            eidtText4.setInputType(EditorInfo.TYPE_CLASS_NUMBER);
            eidtText5.setInputType(EditorInfo.TYPE_CLASS_NUMBER);
            eidtText6.setInputType(EditorInfo.TYPE_CLASS_NUMBER);
    
            //添加内容改变的事件监听
            eidtText1.addTextChangedListener(this);
            eidtText2.addTextChangedListener(this);
            eidtText3.addTextChangedListener(this);
            eidtText4.addTextChangedListener(this);
            eidtText5.addTextChangedListener(this);
            eidtText6.addTextChangedListener(this);
    
    
            eidtText1.setOnKeyListener(this);
            eidtText2.setOnKeyListener(this);
            eidtText3.setOnKeyListener(this);
            eidtText4.setOnKeyListener(this);
            eidtText4.setOnKeyListener(this);
            eidtText5.setOnKeyListener(this);
            eidtText6.setOnKeyListener(this);
    
        }
    
        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    
        }
    
        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
            int length = 0;
            //Log.d("test","current="+current+"我变了");
            switch (current) {
                case 0:
                    length = eidtText1.getText().length();
                    changeFocus(length, eidtText2);
                    passwordInput[0] = eidtText1.getText().toString();
                    break;
                case 1:
                    length = eidtText2.getText().length();
                    changeFocus(length, eidtText3);
                    passwordInput[1] = eidtText2.getText().toString();
                    break;
                case 2:
                    length = eidtText3.getText().length();
                    changeFocus(length, eidtText4);
                    passwordInput[2] = eidtText3.getText().toString();
                    break;
                case 3:
                    length = eidtText4.getText().length();
                    changeFocus(length, eidtText5);
                    passwordInput[3] = eidtText4.getText().toString();
                    break;
                case 4:
                    length = eidtText5.getText().length();
                    changeFocus(length, eidtText6);
                    passwordInput[4] = eidtText5.getText().toString();
                    break;
                case 5:
                    length = eidtText6.getText().length();
                    if (length >= 1) {
                        passwordInput[5] = eidtText6.getText().toString();
                        myJudgePasswordInterface.returnJudgePasswordResult(validatePassword());
                        this.cancel();
                    }
            }
        }
        @Override
        public void afterTextChanged(Editable s) {
    
        }
        void changeFocus(int l,EditText editText){
            if(l >= maxLen){
                current++;
                editText.setFocusable(true);
                editText.setFocusableInTouchMode(true);
                editText.requestFocus();
                editText.findFocus();
            }
        }
        boolean validatePassword(){
            current=0;
            StringBuffer stringBuffer=new StringBuffer();
            for(int i=0;i<passwordInput.length;i++){
                stringBuffer.append(passwordInput[i]);
            }
            String psw =stringBuffer.toString();
            return psw.equals(password);
        }
        @Override
        public boolean onKey(View v, int keyCode, KeyEvent event) {
            if (keyCode == KeyEvent.KEYCODE_DEL
                    && event.getAction() == KeyEvent.ACTION_DOWN) {
                current--;
                switch(current){
                    case 0:eidtText1.setText("");requestF(eidtText1);break;
                    case 1:eidtText2.setText("");requestF(eidtText2);break;
                    case 2:eidtText3.setText("");requestF(eidtText3);break;
                    case 3:eidtText4.setText("");requestF(eidtText4);break;
                    case 4:eidtText5.setText("");requestF(eidtText5);break;
                    case 5:eidtText6.setText("");requestF(eidtText6);break;
                }
            }
            return false;
        }
        void requestF(EditText editText){
            editText.setFocusable(true);
            editText.setFocusableInTouchMode(true);
            editText.requestFocus();
            editText.findFocus();
        }
    }

    ChargeActivity.java

    package com.example.administrator.bigelephantbike;
    
    import android.app.Activity;
    import android.app.AlertDialog;
    import android.app.Dialog;
    import android.content.Intent;
    import android.os.Bundle;
    import android.text.TextWatcher;
    import android.util.Log;
    import android.view.View;
    import android.widget.Button;
    import android.widget.LinearLayout;
    import android.widget.TextView;
    import android.widget.Toast;
    import wheelview.ArrayWheelAdapter;
    import wheelview.OnWheelChangedListener;
    import wheelview.WheelView;
    
    public class ChargeActivity extends Activity implements OnWheelChangedListener,View.OnClickListener{
       private Button recoverBtn;
        private String passwordReturn="123456";
        private String passwordRecover="234567";
    
        private PasswordDialog myDialog;
        //密码输入是否正确
        private boolean pswResult;
        //实现MyJudgePasswordInterface
        private MyJudgePasswordInterface myJudgePasswordInterface;
        //1标识输入的是还车密码,2表示输入的是恢复密码
        private int flag=0;
    
        private String []nums={"0","1","2","3","4","5","6","7","8","9"};
    
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_charge);
    
            returnBtn =(Button)findViewById(R.id.return_btn);
            recoverBtn =(Button)findViewById(R.id.recover_btn);
    
            myJudgePasswordInterface=new MyJudgePasswordInterface() {
                @Override
                public void returnJudgePasswordResult(boolean result) {
                    pswResult = result;
    }
    }; returnBtn.setOnClickListener(this); recoverBtn.setOnClickListener(this); } @Override public void onClick(View v) { //当点击还车按钮时 if(v.getId()==R.id.return_btn){ flag=1; myDialog =new PasswordDialog(ChargeActivity.this,this.getResources().getString(R.string.input_return_code),this.getResources().getString(R.string.return_tips),passwordReturn,myJudgePasswordInterface); myDialog.show(); } if(v.getId()==R.id.recover_btn){ flag=2; myDialog=new PasswordDialog(ChargeActivity.this,this.getResources().getString(R.string.input_recover_tips),this.getResources().getString(R.string.recover_tips),passwordRecover,myJudgePasswordInterface); myDialog.show(); } } }

     



    转载于:https://www.cnblogs.com/rainhome/p/5351200.html

    展开全文
  • YUI3 dialog组件

    2010-07-05 11:43:28
    基于YUI3dialog组件该组件是基于YUI3开发的,功能强大,详细见http://www.qiqicartoon.com
  • Dialog的使用

    2018-03-27 22:38:00
    概述 Dialog是Android的提示框,虽然说是很基础的东西,但是里面其实还有很多值得学习交流的地方。本文将从以下三个方面学习Dialog: 1.夯实基础--AlertDialog的六种使用方式 ... 3.使用RxBus优雅地完...
  • 主要介绍了Android实现dialog的3D翻转示例,非常具有实用价值,需要的朋友可以参考下
  • bootstrap3-dialog

    2018-11-14 11:07:28
    dist目录下取相关js,css文件。使用说明可参考:https://blog.csdn.net/mezheng/article/details/84063040
  • jquery dialog css3弹出对话框插件实例 jquery dialog css3弹出对话框插件实例
  • Swift 3 popup model dialog传递数据
  • Dialog实现3D翻转效果,资源里包含两种旋转效果。 修改Z轴,有效改变旋转效果。
  • yui3dialog

    2010-07-18 20:11:00
    不过看成文时间+使用yui3版本,与当前yui3版本有差异。因此在YUI 3.1.1 下需调整如下代码:[code]box.dd.addHandle('.yui3-widget-hd');[/code]原文是:box.dd.addHandle('.yui-widget-hd');也就是className变化了。...
  • Dialog的基础使用形式

    2018-04-09 16:14:08
    3、列表Dialog 4、单选Dialog 5、多选Dialog 6、等待Dialog 7、进度条Dialog 8、输入框Dialog 9、自定义Dialog &lt;?xml version="1.0" encoding="utf-8"?&gt; ...
  • <div><p>Creates a DialogBox with 3x3 table with (0,1) -> caption (1,1) -> widget <p>Other elements are empty DIVs, with GWT CSS classes that can be used for styling. <p>See: ...
  • <div><p>We should display a warning dialog for AS3 movies indicating that they probably won't work properly. It can be similar to the panic dialog, but it should be dismissable and maybe not as ...
  • <img alt="wayfire_dialog3" src="https://user-images.githubusercontent.com/6224679/87002294-def07f80-c1eb-11ea-9e44-c0bd86f44be1.png" /></p> <p>Top right workspace, dialog is in the "wrong" ...
  • Scrape dialog

    2020-12-28 05:42:00
    <p><img alt="image" src="https://user-images.githubusercontent.com/53250216/86109980-521d3600-bb08-11ea-9d37-7318a3a75aac.png" /></p> <p>This dialog is not shown in the new performers screen - details...
  • Center Dialog

    2020-12-08 18:11:47
    <div><p>Hi. <p>How can i verticaly center the dialog? <p>In Bootstrap Modal, i used the following code and it's works fine but dont work for Bootstrap-Dialog. ...nakupanda/bootstrap3-dialog</p></div>
  • Customize dialog

    2020-12-25 17:21:34
    <div><p>Hi, thanks for this library. how can i customize Dialog? for example : change Title color, change menu icon and text ...3</p><p>该提问来源于开源项目:raphaelbussa/BottomDialog</p></div>

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 20,236
精华内容 8,094
关键字:

dialog3