我正在尝试创建一个表单,该表单将根据复选框刻度线启用和禁用。
<div class="row">
<div class="col-md-12">
<p>Is this client user</p>
<input
type="checkbox"
name="is_user"
id="is_user"
onclick="enableCreateUser()"
/>
</div>
</div>
<div class="row" id="user_register">
<div class="form-group row">
<div class="col-md-6">
<label class="" for="username">Username:</label>
</div>
<div class="col-md-6">
<input class="form-control" type="text" name="username"/>
</div>
</div>
<div class="form-group row">
<div class="col-md-6">
<label class="" for="password">Password:</label>
</div>
<div class="col-md-6">
<input class="form-control" type="password" name="password"/>
</div>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
我正在尝试制作这个 javascript 或 jquery 函数,它允许我使用id="user_register".
这是我尝试过的代码。
function enableCreateUser() {
if (document.getElementById("is_user").checked) {
document.getElementById("user_register").disabled = true;
}
if (!document.getElementById("is_user").checked) {
document.getElementById("user_register").disabled = false;
} …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用SQLite数据库创建一个asp.net核心2.1应用程序。这是我第一次使用SQLite。我在尝试搭建控制器并从模型查看时遇到错误。
Finding the generator 'controller'...
Running the generator 'controller'...
Attempting to compile the application in memory.
Attempting to figure out the EntityFramework metadata for the model and DbContext: 'Doctor'
Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqliteOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.Sqlite, Version=1.1.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation. StackTrace:
at Microsoft.EntityFrameworkCore.SqliteDbContextOptionsBuilderExtensions.UseSqliteMethod 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqliteOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.Sqlite, Version=1.1.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
at PatientRecord.Startup.<>c.<ConfigureServices>b__4_1(DbContextOptionsBuilder options)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass1_0`2.<AddDbContext>b__0(IServiceProvider p, DbContextOptionsBuilder b)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.DbContextOptionsFactory[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass10_0`1.<AddCoreServices>b__0(IServiceProvider p)
at …Run Code Online (Sandbox Code Playgroud)sqlite dbcontext asp.net-mvc-scaffolding entity-framework-core asp.net-core-2.1