Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript modals交叉按钮不适用于鼠标单击_Javascript_Html_Css_Bootstrap Modal - Fatal编程技术网

Javascript modals交叉按钮不适用于鼠标单击

Javascript modals交叉按钮不适用于鼠标单击,javascript,html,css,bootstrap-modal,Javascript,Html,Css,Bootstrap Modal,我有一个引导模式。模态工作正常,但它的交叉按钮不适用于鼠标单击。我的意思是,如果我想关闭模态,请使用鼠标,它的交叉按钮不适用。对于键盘,我指的是ESC按钮。有人能帮我吗 我的模式代码: <div class="modal fade" id="myModal" tabindex="-1" role="basic" aria-hidden="true"> <div class="modal-dialog" style="bor

我有一个引导模式。模态工作正常,但它的交叉按钮不适用于鼠标单击。我的意思是,如果我想关闭模态,请使用鼠标,它的交叉按钮不适用。对于键盘,我指的是ESC按钮。有人能帮我吗

我的模式代码:

<div class="modal fade" id="myModal" tabindex="-1" role="basic" aria-hidden="true">
                            <div class="modal-dialog" style="border-radius: 30px;">
                                <div class="modal-content help-popup" style="">
                                    <div class="modal-header">
                                        <h4 class="modal-title"> Login To Continue...</h4>
                                        <span class="btn_close">
                                            <i class="fa fa-times" aria-hidden="true"></i>
                                        </span>
                                    </div>
                                    <div class="modal-body">
                                        <div class="row side_pop">
                                            <div class="col-md-12 col-sm-12 col-xs-12">
                                                <div class="modal-body">
                                                    <div class="col-md-6">
                                                        @if(count($errors)>0)
                                                            <div class = "alert alert-error" style="color:red">
                                                                @foreach($errors->all() as $error)
                                                                    <div class="alert alert-warning alert-block">
                                                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                                            <span aria-hidden="true">&times;</span></button>
                                                                        <strong>{{ $error }}</strong>
                                                                    </div>
                                                                @endforeach
                                                            </div>
                                                        @endif
                                                        @include('backend.layout.flash-message')
                                                            <fieldset>
                                                                {{ Form::open(['route' => 'login','class'=>'login-form']) }}
                                                                <div class="form-group">
                                                                    <label class="control-label"
                                                                           style=" font-weight: bold;">Email
                                                                        ID</label>
                                                                    {!! Form::email('email', null,['id' => 'email','class'=>'form-control','placeholder'=>'Email or Candidate Phone','autocomplete'=>'off','required']) !!}
                                                                    @if ($errors->has('email'))
                                                                        <span class="invalid-feedback" role="alert"
                                                                              style="color:red">
                                                                <strong
                                                                    style="color:red">{{ $errors->first('email') }}</strong>
                                                            </span>
                                                                    @endif
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="control-label"
                                                                           style=" font-weight: bold;">Password</label>
                                                                    {!! Form::password('password',['id' => 'password','class'=>'form-control','placeholder'=>'Password','autocomplete'=>'off','required']) !!}
                                                                    @if ($errors->has('password'))
                                                                        <span class="invalid-feedback" role="alert"
                                                                              style="color:red">
                                                                <strong
                                                                    style="color:red">{{ $errors->first('password') }}</strong>
                                                            </span>
                                                                    @endif
                                                                </div>
                                                                <div class="form-actions">
                                                                    <button type="submit"
                                                                            class="btn btn-primary uppercase">Login
                                                                    </button>

                                                                    @if (Route::has('password.request'))
                                                                        <a href="{{ route('password.request') }}"
                                                                           id="forget-password"
                                                                           class="forget-password" >Forgot
                                                                            Password?</a>
                                                                    @endif
                                                                </div>
                                                                {{ Form::close() }}
                                                            </fieldset>
                                                    </div>

登录以继续。。。
@如果(计数($errors)>0)
@foreach($errors->all()作为$error)
&时代;
{{$error}}
@endforeach
@恩迪夫
@包括('backend.layout.flash消息')
{Form::open(['route'=>'login','class'=>'login-Form'])}
电子邮件
身份证件
{!!Form::email('email',null,['id'=>'email','class'=>'Form-control','placeholder'=>'email或候选者电话','autocomplete'=>'off','required'])
@如果($errors->has('email'))
{{{$errors->first('email')}
@恩迪夫
密码
{!!Form::password('password',['id'=>'password','class'=>'Form-control','placeholder'=>'password','autocomplete'=>'off','required'])
@如果($errors->has('password'))
{{{$errors->first('password')}
@恩迪夫
登录
@如果(路由::has('password.request'))
@恩迪夫
{{Form::close()}}

我通过在模式的交叉按钮中输入data dismission=“modal”得到了解决方案。现在按钮属性是

<span class="btn_close">
   <i class="fa fa-times" aria-hidden="true" data-dismiss="modal"></i>
</span>

请编辑您的代码格式