美好的一天!我的问题是我的第二个模式,当它显示而第一个模式被隐藏时,则所有模式页面的输入和按钮都无法单击,但,当我尝试输入其中一个输入,然后在第一个模态输入上给出值。另外还有一些可点击按钮,这些按钮没有显示,但显示在第一个模式中,就像第二个模式可见,但 STILL (第一个模式)仅保留在那里。
这是我的第一个模态。
[{
"id":"9",
"uname":"mine",
"uemail":"mine@gmail.com",
"upass":"nomination"
}]
这是我的第二个模态
<div class="modal fade2" id="register" role="dialog" aria-labelledby="register" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
</div>
<div class="modal-body">
<div class="col-md-8">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12 box-shad">
<div class="card">
<div class="card-header text-center"><strong>FILL OUT INFORMATION:</strong></div>
<div class="card-body">
<form method="POST" name="form2" id="form2" class="form2" action="{{ route('register') }}">
@csrf
<div class="form-group row">
<label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Name') }}</label>
<div class="col-md-6">
<input id="name" placeholder="e.g: John Doe" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>
@error('name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row">
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>
<div class="col-md-6">
<input id="email" placeholder="e.g: johndoe@email.com" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email">
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label>
<div class="col-md-6">
<input id="password" placeholder="Enter at least 6 characters: **********" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row">
<label for="password-confirm" class="col-md-4 col-form-label text-md-right">{{ __('Confirm Password') }}</label>
<div class="col-md-6">
<input id="password-confirm" placeholder="**********" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
</div>
</div>
<div class="form-group row mb-0">
<div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary btn-block">
JOIN COMMUNITY
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
最后,这是我的Javascript代码
$('#register')。modal();
<div class="modal fade2" id="join" tabindex="-1" role="dialog" aria-labelledby="join" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h2>LOGIN</h2>
</div>
<div class="modal-body">
<div class="row padding">
<div class="col-md-12">
<div class="card">
<div class="card-header">See our community</div>
<div class="card-body box-shad">
<div class="row">
<div class="col-sm-7">
<form method="POST" name="form1" id="form1" class="form1" action="{{ route('login') }}">
@csrf
<div class="form-group row">
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>
<div class="col-md-6">
<input id="email" placeholder="e.g: johndoe@email.com" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label>
<div class="col-md-6">
<input id="password" placeholder="e.g: **********" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row">
<div class="col-md-6 offset-md-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
<label class="form-check-label" for="remember">
{{ __('Remember Me') }}
</label>
</div>
</div>
</div>
<div class="form-group row mb-0">
<div class="col-md-8 offset-md-4">
<button type="submit" class="btn btn-primary btn-block">
{{ __('Login') }}
</button><hr>
@if (Route::has('password.request'))
<a class="btn btn-link" href="{{ route('password.request') }}">
{{ __('Forgot Your Password?') }}
</a>
@endif
</div>
</div>
</form>
</div>
</div>
</div>
<button type="button" class="btn btn-md btn-danger box-shad" data-dismiss="modal"><strong> CANCEL </strong></button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>